| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2020 TATA ELXSI |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | */ |
| 18 | /** |
| 19 | * @ file contains @mixin functions for font-weight |
| 20 | * example: @include fontWeight(600); (OR) @include fontWeight(semi-bold); |
| 21 | */ |
| 22 | |
| 23 | // @mixin for font weight |
| 24 | @mixin fontWeight($weight){ |
| 25 | $weights: ( |
| 26 | thin: 100, |
| 27 | extra-light: 200, |
| 28 | light: 300, |
| 29 | regular: 400, |
| 30 | medium: 500, |
| 31 | semi-bold: 600, |
| 32 | bold: 700, |
| 33 | extra-bold: 800, |
| 34 | ultra-bold: 900 |
| 35 | ); |
| 36 | |
| 37 | $output: $weight; |
| 38 | @if map-has-key($weights, $weight) { |
| 39 | $output: map-get($weights, $weight); |
| 40 | } |
| 41 | |
| 42 | font-weight: $output; |
| 43 | } |