Last active
May 24, 2019 22:29
-
-
Save GarrettBlackmon/8169fa6eedfb6ba20dcb2880c33b85c5 to your computer and use it in GitHub Desktop.
Ultra tiny ad-hoc scss library to be used in conjunction with vuetify.
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
| // Small tablets and large smartphones | |
| $screen-xs: 600px; | |
| // Small tablets | |
| $screen-sm: 960px; | |
| // Tablets and small desktops | |
| $screen-md: 1264px; | |
| // Large tablets and desktops | |
| $screen-lg: 1904px; | |
| // True if viewport < 600px | |
| @mixin xs { | |
| @media (max-width: #{$screen-xs}) { | |
| @content; | |
| } | |
| } | |
| // True if viewport < 960px | |
| @mixin sm { | |
| @media (max-width: #{$screen-sm}) { | |
| @content; | |
| } | |
| } | |
| // True if viewport < 1264px | |
| @mixin md { | |
| @media (max-width: #{$screen-md}) { | |
| @content; | |
| } | |
| } | |
| // True if viewport < 1904px | |
| @mixin lg { | |
| @media (max-width: #{$screen-lg}) { | |
| @content; | |
| } | |
| } | |
| // True if viewport > 1904px | |
| @mixin xl { | |
| @media (min-width: #{$screen-xl}) { | |
| @content; | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yellow Card Break Points
Installation
Import
_breakpoints.scssby either importing it directly in the script tag@import "~/assets/style/_breakpoints.scss";Or more usefully import it globally with a loader like style-resources.
Usage
Once imported use breakpoints like this
If you would like to change properties of multiple classes with a single mixin, you may use this schema.
Supplimental Information
This library is built to work with the breakpoints built into vuetify.
For example
will change
.box's background color to blue at the same viewport size aswill change
.boxto a full width element.