Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Commit 9aede4e

Browse files
fix - Optimise base stylus
1 parent a08cce9 commit 9aede4e

File tree

1 file changed

+82
-57
lines changed

1 file changed

+82
-57
lines changed

src/base/base.styl

Lines changed: 82 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,83 @@
33
@charset "UTF-8"
44

55
:root
6-
--background-color-900: $grey-900
7-
--background-color-800: $grey-800
8-
--background-color-700: $grey-700
9-
--background-color-600: $grey-600
10-
--background-color-500: $grey-500
11-
--background-color-400: $grey-400
12-
--background-color-300: $grey-300
13-
--background-color-200: $grey-200
14-
--background-color-100: $grey-100
15-
--background-color-inverted: $black
16-
--background-color: $white
17-
--border-color: $black
18-
--border-color-100: $grey-100
19-
--border-color-200: $grey-200
20-
--border-color-300: $grey-300
21-
--border-color-400: $grey-400
22-
--border-color-500: $grey-500
23-
--border-color-600: $grey-600
24-
--border-color-700: $grey-700
25-
--border-color-800: $grey-800
26-
--border-color-900: $grey-900
27-
--button-color: $white
28-
--color: $black
29-
--link-color: color-blue
30-
--link-color-visited: color-purple
31-
--link-color-hover: color-red
32-
--link-color-focus: color-red
33-
--inverted-color: $white
6+
7+
/// Basic primary colors
8+
$primary = #0047dd
9+
$secondary = #0057a8
10+
$tertiary = #777777
11+
$disable = #F1F3F4
12+
$info = #008196
13+
$inverse = #ffffff
14+
$link = #1b6ec2
15+
$danger = #b2081a
16+
$success = #2e6430
17+
$warning = #993900
18+
19+
$bg-primary = #c6cdff
20+
$bg-secondary = #a9d2ff
21+
$bg-tertiary = #777777
22+
$bg-disable = #F1F3F4
23+
$bg-info = #f7ffff
24+
$bg-inverse = #ffffff
25+
$bg-link = #1b6ec2
26+
$bg-danger = #ffc0ad
27+
$bg-success = #a5dfa2
28+
$bg-warning = #ffc286
29+
30+
31+
32+
--color-link: 255, 0, 0;
33+
34+
/// Golden ratio variables
35+
--golden-ratio-font-size golden-font-size-base
36+
--golden-ratio-font-size-small golden-font-size-small
37+
--golden-ratio-font-size-large golden-font-size-large
38+
--golden-ratio-line-height golden-line-height
39+
40+
--background-color-900 $grey-900
41+
--background-color-800 $grey-800
42+
--background-color-700 $grey-700
43+
--background-color-600 $grey-600
44+
--background-color-500 $grey-500
45+
--background-color-400 $grey-400
46+
--background-color-300 $grey-300
47+
--background-color-200 $grey-200
48+
--background-color-100 $grey-100
49+
--background-color-inverted $black
50+
--background-color $white
51+
--border-color $black
52+
--border-color-100 $grey-100
53+
--border-color-200 $grey-200
54+
--border-color-300 $grey-300
55+
--border-color-400 $grey-400
56+
--border-color-500 $grey-500
57+
--border-color-600 $grey-600
58+
--border-color-700 $grey-700
59+
--border-color-800 $grey-800
60+
--border-color-900 $grey-900
61+
--button-color $white
62+
--color $black
63+
--link-color color-blue
64+
--link-color-visited color-purple
65+
--link-color-hover color-red
66+
--link-color-focus color-red
67+
--inverted-color $white
3468

3569
html
36-
-moz-font-feature-settings: 'liga', 'kern'
37-
-moz-osx-font-smoothing: grayscale
38-
-ms-text-size-adjust: 100%
39-
-webkit-font-smoothing: antialiased
40-
-webkit-tap-highlight-color: var(--background-color)
41-
-webkit-text-size-adjust: 100%
42-
font-family: sans-serif
43-
font-size: 63.204452685542773%
44-
overflow-x: hidden
45-
overflow-y: scroll
46-
text-rendering: optimizeLegibility
70+
-webkit-text-size-adjust 100%
71+
display block
72+
font-family sans-serif
73+
font-size 63.204452685542773%
74+
text-rendering optimizeLegibility
4775

4876
body
49-
color: var(--color)
50-
background-color: var(--background-color)
51-
font-family: font
52-
font-size: golden-font-size-base rem
53-
font-weight: 400;
54-
margin: 0;
55-
padding: 0;
56-
word-wrap: break-word
77+
color var(--color)
78+
background-color var(--background-color)
79+
font-family font
80+
font-size var(--golden-ratio-font-size)
81+
font-weight 400
82+
word-wrap break-word
5783

5884
html,
5985
body,
@@ -122,25 +148,24 @@ mark,
122148
audio,
123149
video,
124150
a
125-
margin-bottom: golden-font-size-base rem
126-
box-sizing: border-box
151+
box-sizing border-box
127152

128153
strong, b
129-
font-weight: 700;
130-
color: var(--color)
154+
font-weight 700
155+
color var(--color)
131156

132157
em, i
133-
font-style: italic
158+
font-style italic
134159

135160
small
136-
font-size: golden-font-size-small rem
161+
font-size var(--golden-ratio-font-size-small)
137162

138163
sup
139-
font-size: golden-font-size-small rem
140-
top: 0.8em
164+
font-size var(--golden-ratio-font-size-small)
165+
top 0.8em
141166

142167
sub
143-
font-size: golden-font-size-small rem
144-
bottom: -0.8em
168+
font-size var(--golden-ratio-font-size-small)
169+
bottom -0.8em
145170

146171
/* @end */

0 commit comments

Comments
 (0)