-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
sass.html
106 lines (101 loc) · 3.67 KB
/
sass.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang="en">
<head>
{{> head }}
</head>
<body>
{{> navbar }}
<main>
{{> intro}}
<div class="container">
<div class="row">
<div class="col s12 m8 offset-m1 xl7 offset-xl1">
<!-- Variables Section -->
<div id="variables" class="section scrollspy">
<h3 class="header">Variables</h3>
<p class="error-text">Deprecated in Version 2.1.0. You can use CSS Variables now to change the colors. Take a look at <a href="/themes.html">Themes</a></p>
<p class="caption">
When using Sass, you can change the color scheme of your site extremely quickly. Below is a very small sample of what you can change through sass in
<a href="https://github.com/materializecss/materialize/blob/main/sass/components/_variables.scss">_variables.scss</a>.
</p>
<pre><code class="language-scss">
$primary-color: color("materialize-red", "lighten-2") !default;
$primary-color-light: false !default;
$primary-color-dark: false !default;
@if not $primary-color-light {
$primary-color-light: lighten($primary-color, 15%);
}
@if not $primary-color-dark {
$primary-color-dark: darken($primary-color, 15%);
}
$secondary-color: color("teal", "lighten-1") !default;
$success-color: color("green", "base") !default;
$link-color: color("light-blue", "darken-1") !default;
/*** More variables not shown here.. ***/
</code></pre>
</div>
<!-- Media Queries Section -->
<div id="media" class="section scrollspy">
<h3 class="header">Media Queries</h3>
<p class="caption">
We have 3 media queries for the 3 standard screen sizes you can use in your custom Sass files. This also includes media query variables that will define the range.
</p>
<p>
Small screens are defined as having a max-width of 600px Medium screens are defined as having a max-width of 992px Large screen are defined as having a min-width of
993px Extra Large screen are defined as having a min-width of 1200px
</p>
<h5>CSS</h5>
<pre><code class="language-css col s12">
/* These classes can be added to HTML Elements
* to affect visibility on certain displays.
*/
.hide-on-small-only
.hide-on-small-and-down
.hide-on-med-and-down
.hide-on-med-and-up
.hide-on-med-only
.hide-on-large-only
.show-on-large
.show-on-medium
.show-on-small
.show-on-medium-and-up
.show-on-medium-and-down
</code></pre>
<h5>Sass</h5>
<pre><code class="language-scss col s12">
@media #{$small-and-down} {
// styles for small screens and down
}
@media #{$medium-and-up} {
// styles for medium screens and larger
}
@media #{$medium-and-down} {
// styles for medium screens and down
}
@media #{$large-and-up} {
// styles for large screens and up
}
@media #{$extra-large-and-up} {
// styles for extra large screens and up
}
</code></pre>
</div>
</div>
<div class="col hide-on-small-only m3 xl3">
<div class="toc-wrapper">
<div style="height: 1px">
<ul class="section table-of-contents">
<li><a href="#variables">Variables</a></li>
<li><a href="#media">Media Queries</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- end row -->
</div>
</main>
{{> footer }}
<script type="module" src="/src/main.ts"></script>
</body>
</html>