Created
March 11, 2022 17:35
-
-
Save diarcastro/918ef683f018ea772de34410fcfee229 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @function rem($target: 16, $context: 10) { | |
| $newTarget: $target / ($target * 0 + 1); // Tip to remove the unit from target | |
| @return ($newTarget / $context) * 1rem; | |
| } | |
| $post-mobile : rem(669px); | |
| $tablet : rem(768); | |
| @media screen and (min-width: $post-mobile) { | |
| .test { | |
| color: red; | |
| font-size: rem(24); // How to use it later | |
| } | |
| } | |
| @media screen and (min-width: $tablet) { | |
| .test2 { | |
| color: red; | |
| font-size: rem(12px); // How to use it later | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @media screen and (min-width: 66.9rem) { | |
| .test { | |
| color: red; | |
| font-size: 2.4rem; | |
| } | |
| } | |
| @media screen and (min-width: 76.8rem) { | |
| .test2 { | |
| color: red; | |
| font-size: 1.2rem; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "sass": { | |
| "compiler": "dart-sass/1.32.12", | |
| "extensions": {}, | |
| "syntax": "SCSS", | |
| "outputStyle": "expanded" | |
| }, | |
| "autoprefixer": false | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment