Skip to content

Commit babbe96

Browse files
committed
Changed variables to default, added iconpath variab;e
1 parent a4f0c0c commit babbe96

File tree

7 files changed

+47
-51
lines changed

7 files changed

+47
-51
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/style/base/_base.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@ body {
77
background: var(--base-body-background);
88
color: var(--base-font-color);
99
margin: var(--base-body-gutter);
10-
font: {
11-
family: var(--base-font-family);
12-
}
1310
line-height: 1.2rem;
1411
}

src/style/base/_typography.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
font-style: normal;
77
font-weight: 500;
88
src: local(''),
9-
url('../fonts/icons/cui-icons.eot') format('eot'),
10-
url('../fonts/icons/cui-icons.svg') format('svg'),
11-
url('../fonts/icons/cui-icons.ttf') format('ttf'),
12-
url('../fonts/icons/cui-icons.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
9+
url('#{variables.$iconPath}/cui-icons.eot') format('eot'),
10+
url('#{variables.$iconPath}/cui-icons.svg') format('svg'),
11+
url('#{variables.$iconPath}/cui-icons.ttf') format('ttf'),
12+
url('#{variables.$iconPath}/cui-icons.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
1313
}
1414

1515
h1 {

src/style/base/_variables.scss

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ $colors: (
140140
'dark': hsl(200, 19%, 18%),
141141
'default-font-color': #fff, //AAA
142142
)
143-
);
143+
) !default;
144144

145145
@function color($color, $variant: 'default') {
146146
@return map-get(map-get($colors, $color), $variant);
@@ -149,47 +149,45 @@ $colors: (
149149
/**
150150
* 2. Base
151151
*/
152-
$base-background-color: color('gray', 'background');
153-
$base-body-gutter: 0;
154-
$base-font-color: hsl(200, 19%, 18%);
155-
$base-font-family: 'Inter, apple-sf-pro-text, Helvetica, Arial, sans-serif';
156-
$base-border-color: hsl(0, 0%, 88%);
157-
$base-border-hover-color: hsl(0, 0%, 74%);
158-
$base-border-radius: 4px;
159-
$base-gutter: 1rem;
160-
$base-gutter-steps: 0.25;
152+
$base-background-color: color('gray', 'background') !default;
153+
$base-body-gutter: 0 !default;
154+
$base-font-color: hsl(200, 19%, 18%) !default;
155+
$base-border-color: hsl(0, 0%, 88%) !default;
156+
$base-border-hover-color: hsl(0, 0%, 74%) !default;
157+
$base-border-radius: 4px !default;
158+
$base-gutter: 1rem !default;
159+
$base-gutter-steps: 0.25 !default;
161160

162161
$breakpoints: (
163162
'sm': '640px',
164163
'md': '768px',
165164
'lg': '1024px',
166165
'xl': '1280px'
167-
);
166+
) !default;
168167

169168
:root {
170169
--base-body-background: #{$base-background-color};
171170
--base-body-gutter: #{$base-body-gutter};
172171
--base-font-color: #{$base-font-color};
173-
--base-font-family: #{$base-font-family};
174172
--base-border-color: #{$base-border-color};
175173
--base-border-hover-color: #{$base-border-hover-color};
176174
--base-border-radius: #{$base-border-radius};
177175
--base-gutter: #{$base-gutter};
178176
}
179177

180-
$primary-color: color('deep-purple', 'default');
181-
$primary-color-hover: color('deep-purple', 'hover');
182-
$primary-color-active: color('deep-purple', 'active');
183-
$primary-color-light-background: color('deep-purple', 'background');
178+
$primary-color: color('deep-purple', 'default') !default;
179+
$primary-color-hover: color('deep-purple', 'hover') !default;
180+
$primary-color-active: color('deep-purple', 'active') !default;
181+
$primary-color-light-background: color('deep-purple', 'background') !default;
184182

185-
$danger-color: color('red', 'default');
186-
$danger-color-hover: color('red', 'hover');
187-
$danger-color-active: color('red', 'active');
188-
$danger-color-light-background: color('red', 'background');
183+
$danger-color: color('red', 'default') !default;
184+
$danger-color-hover: color('red', 'hover') !default;
185+
$danger-color-active: color('red', 'active') !default;
186+
$danger-color-light-background: color('red', 'background') !default;
189187

190-
$success-color: color('green', 'default');
191-
$success-color-hover: color('green', 'hover');
192-
$success-color-active: color('green', 'active');
188+
$success-color: color('green', 'default') !default;
189+
$success-color-hover: color('green', 'hover') !default;
190+
$success-color-active: color('green', 'active') !default;
193191

194192
:root {
195193
--primary-color: #{$primary-color};
@@ -210,8 +208,8 @@ $success-color-active: color('green', 'active');
210208
/**
211209
* 3. Panel
212210
*/
213-
$panel-background: #fff;
214-
$panel-gutter: 2rem;
211+
$panel-background: #fff !default;
212+
$panel-gutter: 2rem !default;
215213

216214
:root {
217215
--panel-background: #{$panel-background};
@@ -221,7 +219,7 @@ $panel-gutter: 2rem;
221219
/**
222220
* 4. Page
223221
*/
224-
$page-gutter: 2rem;
222+
$page-gutter: 2rem !default;
225223

226224
:root {
227225
--page-gutter: #{$page-gutter};
@@ -230,19 +228,19 @@ $page-gutter: 2rem;
230228
/**
231229
* 5. Button
232230
*/
233-
$button-padding: 1rem;
234-
$button-font-weight: 600;
235-
$button-font-size: 1rem;
231+
$button-padding: 1rem !default;
232+
$button-font-weight: 600 !default;
233+
$button-font-size: 1rem !default;
236234

237-
$primary-button-ghost-hover-background: color('deep-purple', 'background');
238-
$primary-button-ghost-active-background: color('deep-purple', 'background-hover');
235+
$primary-button-ghost-hover-background: color('deep-purple', 'background') !default;
236+
$primary-button-ghost-active-background: color('deep-purple', 'background-hover') !default;
239237

240-
$secondary-button-background: transparent;
241-
$secondary-button-hover-background: color('deep-purple', 'background');
242-
$secondary-button-active-background: color('deep-purple', 'background-hover');
238+
$secondary-button-background: transparent !default;
239+
$secondary-button-hover-background: color('deep-purple', 'background') !default;
240+
$secondary-button-active-background: color('deep-purple', 'background-hover') !default;
243241

244-
$danger-button-ghost-hover-background: color('red', 'background');
245-
$danger-button-ghost-active-background: color('red', 'background-hover');
242+
$danger-button-ghost-hover-background: color('red', 'background') !default;
243+
$danger-button-ghost-active-background: color('red', 'background-hover') !default;
246244

247245
:root {
248246
--button-padding: #{$button-padding};
@@ -281,8 +279,8 @@ $danger-button-ghost-active-background: color('red', 'background-hover');
281279
/**
282280
* 6. Cards
283281
*/
284-
$card-padding: 1.5rem;
285-
$card-background: #fff;
282+
$card-padding: 1.5rem !default;
283+
$card-background: #fff !default;
286284

287285
:root {
288286
--card-padding: #{$card-padding};
@@ -292,9 +290,9 @@ $card-background: #fff;
292290
/**
293291
* 7. Form fields
294292
*/
295-
$form-field-padding: 1rem;
296-
$form-field-font-weight: 500;
297-
$form-field-font-size: 1rem;
293+
$form-field-padding: 1rem !default;
294+
$form-field-font-weight: 500 !default;
295+
$form-field-font-size: 1rem !default;
298296

299297
:root {
300298
--form-field-padding: #{$form-field-padding};
@@ -305,6 +303,7 @@ $form-field-font-size: 1rem;
305303
/**
306304
* 8. Icons
307305
*/
306+
$iconPath: '../icons' !default;
308307
$icons: (
309308
'activity': '\e900',
310309
'alert-circle': '\e901',
@@ -559,9 +558,9 @@ $icons: (
559558
/**
560559
* 8. Form fields
561560
*/
562-
$form-field-padding: 1rem;
563-
$form-field-font-weight: 500;
564-
$form-field-font-size: 1rem;
561+
$form-field-padding: 1rem !default;
562+
$form-field-font-weight: 500 !default;
563+
$form-field-font-size: 1rem !default;
565564

566565
:root {
567566
--form-field-padding: #{$form-field-padding};

0 commit comments

Comments
 (0)