Quellcode durchsuchen

:art: big sss changes | modular scales

tags/0.9.0
j vor 5 Jahren
Ursprung
Commit
4ab5983fa8

+ 8
- 8
vue-theme/postcss.config.js Datei anzeigen

@@ -1,9 +1,9 @@
1 1
 module.exports = {
2
-    parser: 'sugarss',
3
-    plugins: [
4
-        require('postcss-import'),
5
-        require('postcss-calc'),
6
-        require('precss'),
7
-        require('autoprefixer')
8
-    ]
9
-}
2
+  parser: "sugarss",
3
+  plugins: [
4
+    require("postcss-import"),
5
+    require("precss"),
6
+    require("postcss-calc"),
7
+    require("autoprefixer"),
8
+  ],
9
+};

+ 9
- 8
vue-theme/src/app.vue Datei anzeigen

@@ -21,6 +21,7 @@ export default {
21 21
 
22 22
 <style lang="postcss">
23 23
 @import './sss/variables.sss'
24
+@import './sss/theme.sss'
24 25
 
25 26
 html 
26 27
     /* Hide the wpadminbar */
@@ -41,7 +42,7 @@ html
41 42
                 background-color: lightblue
42 43
                 max-width: $max-width
43 44
                 margin: 0 auto
44
-                padding: $ms 0
45
+                padding: $ms-0 0
45 46
                 align-items: flex-start
46 47
                 
47 48
                 /* Block Shadow Thing */
@@ -52,10 +53,10 @@ html
52 53
                 /* Content Pieces */
53 54
                 .post
54 55
                     background-color: teal
55
-                    margin: 0 0 $ms
56
+                    margin: 0 0 $ms-0
56 57
                     &--title
57 58
                         color: yellow
58
-                        padding: 0 0 $ms
59
+                        padding: 0 0 $ms-0
59 60
                     &--content
60 61
                         color: orange
61 62
                         &--block > p
@@ -71,9 +72,9 @@ html
71 72
                 > article
72 73
                     background-color: lightpink
73 74
                     > * > * 
74
-                        padding: $ms
75
+                        padding: $ms-0
75 76
                     > section, > header
76
-                        margin: 0 0 $ms
77
+                        margin: 0 0 $ms-0
77 78
                     .block-wrapper
78 79
                         .wp-block-gallery
79 80
                             .blocks-gallery
@@ -97,13 +98,13 @@ html
97 98
                 /* Sidebar */
98 99
                 > aside
99 100
                     background-color: salmon
100
-                    margin: 0 0 0 $ms
101
+                    margin: 0 0 0 $ms-0
101 102
                     min-width: 27%
102 103
                     width: 27%
103 104
                     > section
104 105
                         > *
105
-                            padding: $ms
106
-                            margin: 0 0 $ms 0
106
+                            padding: $ms-0
107
+                            margin: 0 0 $ms-0 0
107 108
                         > .post
108 109
                             background-color: blue
109 110
 

+ 7
- 4
vue-theme/src/components/footer.vue Datei anzeigen

@@ -35,7 +35,9 @@
35 35
                     router-link(to="/episodes") PBS Series
36 36
                 ul.f-col.start
37 37
                     li Episodes
38
-                    li Sho 
38
+                    li Shorts
39
+                    li 
40
+                h5
39 41
                     router-link(to="/artists") Artists
40 42
                 ul.f-col.start
41 43
                     li
@@ -93,6 +95,7 @@
93 95
 
94 96
 <style lang="postcss">
95 97
 @import '../sss/variables.sss'
98
+@import '../sss/theme.sss'
96 99
 
97 100
 .footer-wrapper
98 101
     background-color: lightgreen
@@ -110,13 +113,13 @@
110 113
         // OUTER <ul> tags
111 114
         > ul
112 115
             background-color: lightgrey
113
-            padding: $ms
116
+            padding: $ms-0
114 117
             > li
115
-                padding: $ms 0
118
+                padding: $ms-0 0
116 119
                 width: 100%
117 120
                 h5
118 121
                     color: $cia_white
119
-                    margin: 0 0 $ms
122
+                    margin: 0 0 $ms-0
120 123
                 a
121 124
                     color: $cia_white
122 125
                 ul

+ 1
- 0
vue-theme/src/components/gallery.vue Datei anzeigen

@@ -68,6 +68,7 @@ export default {
68 68
 
69 69
 <style lang="postcss">
70 70
 @import '../sss/variables.sss'
71
+@import '../sss/theme.sss'
71 72
 
72 73
 .gallery
73 74
     overflow: hidden

+ 1
- 0
vue-theme/src/components/navigation/navigation.vue Datei anzeigen

@@ -44,6 +44,7 @@ nav.main
44 44
 
45 45
 <style lang="postcss">
46 46
 @import '../../sss/variables.sss'
47
+@import '../../sss/theme.sss'
47 48
 
48 49
 nav.main
49 50
     position: sticky

+ 3
- 2
vue-theme/src/pages/index.vue Datei anzeigen

@@ -51,19 +51,20 @@ export default {
51 51
 
52 52
 <style lang="postcss">
53 53
 @import '../sss/variables.sss'
54
+@import '../sss/theme.sss'
54 55
 
55 56
 .page--index
56 57
     article
57 58
         .f-row
58 59
             &:nth-of-type(2)
59
-                margin: $ms 0
60
+                margin: $ms-0 0
60 61
         section
61 62
             flex-grow: 1
62 63
             &:nth-of-type(1)
63 64
                 flex-grow: 3
64 65
             &:nth-of-type(2), &:nth-of-type(3)
65 66
                 flex-grow: 1
66
-                margin: 0 0 0 $ms
67
+                margin: 0 0 0 $ms-0
67 68
             &:nth-of-type(4), &:nth-of-type(5)
68 69
                 flex-grow: 4
69 70
     footer

+ 50
- 5
vue-theme/src/sss/_helpers.sss Datei anzeigen

@@ -1,3 +1,6 @@
1
+@import './variables.sss'
2
+@import './theme.sss'
3
+
1 4
 /* Custom selectors */
2 5
 @custom-selector :--headings h1, h2, h3, h4, h5, h6
3 6
 
@@ -7,6 +10,7 @@
7 10
     display: flex
8 11
     justify-content: center
9 12
     align-items: center
13
+
10 14
 .f
11 15
     &-row, &-col
12 16
         @extend %flexer
@@ -18,22 +22,63 @@
18 22
             justify-content: space-between
19 23
         &.around
20 24
             justify-content: space-around
25
+        &.even
26
+            justify-content: space-evenly
27
+        &.stretch
28
+            justify-content: space-stretch
21 29
         &.center
22 30
             justify-content: center
23 31
             align-items: center
32
+        &.wrap
33
+            flex-flow: wrap
24 34
     &-row
25 35
         flex-direction: row
26 36
     &-col
27 37
         flex-direction: column
28 38
     &-grow
29 39
         flex-grow: 1
30
-    &-wrap
31
-        flex-flow: wrap
40
+        
32 41
 
42
+%borderer
43
+    border-width: 1px
44
+    border-color: $primary
33 45
 .b
34
-    &-radius
35
-        border-radius: 5px
36 46
     &-none
37 47
         border: none
38 48
     &-solid
39
-        border: #000000 1px solid
49
+        @extend %borderer
50
+        border: #000000 1px solid
51
+    &-dash
52
+        @extend %borderer
53
+        border: #000000 1px dashed
54
+    &-dot
55
+        @extend %borderer
56
+        border: #000000 1px dotted
57
+    &-pill
58
+        border-radius: 999px
59
+    &-radius
60
+        border-radius: $ms-0
61
+    &-shadow
62
+        box-shadow: 1px 3px 12px #011
63
+
64
+button
65
+    &:hover
66
+        cursor: pointer
67
+        transition: $transition
68
+    &.b
69
+        &-pill
70
+            padding: $ms-1 $ms-0
71
+            line-height: $ms-1
72
+            text-transform: uppercase
73
+.bg
74
+    &-none
75
+        background-color: transparent !important
76
+        background: none
77
+
78
+.z
79
+    &-top
80
+        z-index: 10001
81
+    &-bottom
82
+        z-index: 1
83
+    &-back
84
+        z-index: -1

+ 13
- 0
vue-theme/src/sss/_ratios.sss Datei anzeigen

@@ -0,0 +1,13 @@
1
+$minor-second: 1.067
2
+$major-second: 1.125
3
+$minor-third: 1.2
4
+$major-third: 1.25
5
+$perfect-fourth: 1.333
6
+$augmented-fourth: 1.414
7
+$perfect-fifth: 1.5
8
+$minor-sixth: 1.6
9
+$golden: 1.618
10
+$major-sixth: 1.667
11
+$minor-seventh: 1.778
12
+$major-seventh: 1.875
13
+$octave: 2

+ 2
- 3
vue-theme/src/sss/_typography.sss Datei anzeigen

@@ -1,4 +1,5 @@
1 1
 @import './variables.sss'
2
+@import './theme.sss'
2 3
 
3 4
 .t
4 5
     &-cntr
@@ -20,12 +21,10 @@
20 21
     &-mono
21 22
         font-family: $mono
22 23
 
23
-a
24
-    color: $cia_grey
24
+a~
25 25
     /* text-decoration: none,  leave for now to show links underlined */
26 26
     &:hover
27 27
         cursor: pointer
28
-        color: $cia_black
29 28
 
30 29
 h1, h2, h3, h4, h5, h6 /* common */
31 30
     display: block

+ 7
- 3
vue-theme/src/sss/index.js Datei anzeigen

@@ -1,4 +1,8 @@
1 1
 // Include all your *.sss Sugarss files
2
-import './_reset.sss'
3
-import './_typography.sss'
4
-import './_helpers.sss'
2
+import "./_reset.sss";
3
+import "./_ratios.sss";
4
+import "./_helpers.sss";
5
+import "./_typography.sss";
6
+
7
+import "./theme.sss";
8
+import "./variables.sss";

+ 56
- 0
vue-theme/src/sss/theme.sss Datei anzeigen

@@ -0,0 +1,56 @@
1
+@import url('https://fonts.googleapis.com/css?family=Crimson+Text|Questrial')
2
+@import url('https://c0.wp.com/c/5.7/wp-includes/css/dist/block-library/style.css')
3
+
4
+/* Colors */
5
+$blue: #0076A3
6
+$chart-bg: rgba(20,20,20)
7
+$background: #444
8
+$background-light: #505050
9
+$dark: #3F3F3F
10
+$darker: #383838
11
+$light: #BBBBBB
12
+$lighter: #CCCCCC
13
+$primary: #008462
14
+$primary-light: #00D6A3
15
+$primary-lighter: #CEFFF3
16
+$primary-dark: #007351
17
+
18
+$cia_red: #a10000 /* rgb(161, 0, 0) */
19
+$cia_white: #ffffff /* 100% white */
20
+$cia_grey: #efefef /* 5% black */
21
+$cia_black: #0d0d0d /* 95% black */
22
+
23
+$cia_serif: 'Hoefler Text', 'Crimson Text', serif
24
+$cia_sans: 'Questrial', 'Futura', 'Futura PT', sans-serif
25
+
26
+@font-face
27
+  font-family: 'Crimson Text'
28
+  font-style: normal
29
+  font-weight: 400
30
+  font-display: swap
31
+  src: local('Crimson Text Regular'), local('CrimsonText-Regular'), url(https://fonts.gstatic.com/s/crimsontext/v9/wlp2gwHKFkZgtmSR3NB0oRJfbwhT.woff2) format('woff2')
32
+  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD
33
+
34
+@font-face 
35
+  font-family: 'Questrial'
36
+  font-style: normal
37
+  font-weight: 400
38
+  font-display: swap
39
+  src: local('Questrial'), local('Questrial-Regular'), url(https://fonts.gstatic.com/s/questrial/v8/QdVUSTchPBm7nuUeVf70viFl.woff2) format('woff2')
40
+  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD
41
+
42
+/* latin-ext */
43
+@font-face 
44
+  font-family: 'Questrial'
45
+  font-style: normal
46
+  font-weight: 400
47
+  src: url(https://fonts.gstatic.com/s/questrial/v13/QdVUSTchPBm7nuUeVf70sCFluW44JUcz.woff2) format('woff2')
48
+  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF
49
+
50
+/* latin */
51
+@font-face
52
+  font-family: 'Questrial'
53
+  font-style: normal
54
+  font-weight: 400
55
+  src: url(https://fonts.gstatic.com/s/questrial/v13/QdVUSTchPBm7nuUeVf70viFluW44JQ.woff2) format('woff2')
56
+  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD

+ 27
- 67
vue-theme/src/sss/variables.sss Datei anzeigen

@@ -1,70 +1,6 @@
1
-@import url('https://fonts.googleapis.com/css?family=Crimson+Text|Questrial')
2
-@import url('https://c0.wp.com/c/5.7/wp-includes/css/dist/block-library/style.css')
1
+@import './_ratios.sss'
3 2
 
4
-/* Colors */
5
-$blue: #0076A3
6
-$chart-bg: rgba(20,20,20)
7
-$background: #444
8
-$background-light: #505050
9
-$dark: #3F3F3F
10
-$darker: #383838
11
-$light: #BBBBBB
12
-$lighter: #CCCCCC
13
-$primary: #008462
14
-$primary-light: #00D6A3
15
-$primary-lighter: #CEFFF3
16
-$primary-dark: #007351
17
-
18
-$cia_red: #a10000 /* rgb(161, 0, 0) */
19
-$cia_white: #ffffff /* 100% white */
20
-$cia_grey: #efefef /* 5% black */
21
-$cia_black: #0d0d0d /* 95% black */
22
-
23
-
24
-/* Fonts */
25
-$sans: 'Questrial', sans-serif
26
-$serif: 'Hoefler Text', 'Crimson Text', serif
27
-$mono: 'Roboto Mono', monospace
28
-
29
-$cia_serif: 'Hoefler Text', 'Crimson Text', serif
30
-$cia_sans: 'Questrial', 'Futura', 'Futura PT', sans-serif
31
-$cia_transition: 200ms
32
-
33
-@font-face
34
-  font-family: 'Crimson Text'
35
-  font-style: normal
36
-  font-weight: 400
37
-  font-display: swap
38
-  src: local('Crimson Text Regular'), local('CrimsonText-Regular'), url(https://fonts.gstatic.com/s/crimsontext/v9/wlp2gwHKFkZgtmSR3NB0oRJfbwhT.woff2) format('woff2')
39
-  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD
40
-
41
-@font-face 
42
-  font-family: 'Questrial'
43
-  font-style: normal
44
-  font-weight: 400
45
-  font-display: swap
46
-  src: local('Questrial'), local('Questrial-Regular'), url(https://fonts.gstatic.com/s/questrial/v8/QdVUSTchPBm7nuUeVf70viFl.woff2) format('woff2')
47
-  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD
48
-
49
-/* latin-ext */
50
-@font-face 
51
-  font-family: 'Questrial'
52
-  font-style: normal
53
-  font-weight: 400
54
-  src: url(https://fonts.gstatic.com/s/questrial/v13/QdVUSTchPBm7nuUeVf70sCFluW44JUcz.woff2) format('woff2')
55
-  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF
56
-
57
-/* latin */
58
-@font-face
59
-  font-family: 'Questrial'
60
-  font-style: normal
61
-  font-weight: 400
62
-  src: url(https://fonts.gstatic.com/s/questrial/v13/QdVUSTchPBm7nuUeVf70viFluW44JQ.woff2) format('woff2')
63
-  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD
64
-
65
-/* Proportion (to be replaced with modular scale) */
66
-$ms: 1vw
67
-$base: 1em
3
+$transition: 300ms
68 4
 
69 5
 $max-width: 70em
70 6
 
@@ -72,4 +8,28 @@ $max-width: 70em
72 8
 $radius: 2.5vw
73 9
 $path: 4px
74 10
 
75
-$transition: 300ms
11
+/* Proportion */
12
+$base: 1.0em
13
+$ratio: $minor-third
14
+
15
+$ms-0: calc($base)
16
+$ms--1: calc($ms-0 / $ratio)
17
+$ms--2: calc($ms--1 / $ratio)
18
+$ms--3: calc($ms--2 / $ratio)
19
+$ms--4: calc($ms--3 / $ratio)
20
+$ms--5: calc($ms--4 / $ratio)
21
+$ms--6: calc($ms--5 / $ratio)
22
+$ms-1: calc($ms-0 * $ratio)
23
+$ms-2: calc($ms-1 * $ratio)
24
+$ms-3: calc($ms-2 * $ratio)
25
+$ms-4: calc($ms-3 * $ratio)
26
+$ms-5: calc($ms-4 * $ratio)
27
+$ms-6: calc($ms-5 * $ratio)
28
+$ms-7: calc($ms-6 * $ratio)
29
+$ms-8: calc($ms-7 * $ratio)
30
+$ms-9: calc($ms-8 * $ratio)
31
+
32
+/* Fonts */
33
+$sans: 'Questrial', sans-serif
34
+$serif: 'Hoefler Text', 'Crimson Text', serif
35
+$mono: 'Roboto Mono', monospace

Laden…
Abbrechen
Speichern