Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

Commit b7f2ad6

Browse files
authoredMar 16, 2018
Sass (#34)
* rename css to scss * add sass
1 parent e9e8f23 commit b7f2ad6

18 files changed

+556
-594
lines changed
 

‎.stylelintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"rules": {
77
"indentation": 4,
88
"color-hex-length": "long",
9-
"order/properties-alphabetical-order": true
9+
"order/properties-alphabetical-order": true,
10+
"at-rule-no-unknown": null
1011
}
1112
}

‎package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,11 @@
7777
"extract-text-webpack-plugin": "3.0.2",
7878
"html-webpack-harddisk-plugin": "0.2.0",
7979
"html-webpack-plugin": "3.0.6",
80+
"node-sass": "4.8.1",
8081
"nodemon": "1.17.2",
81-
"postcss-apply": "0.9.0",
82-
"postcss-cssnext": "3.1.0",
83-
"postcss-import": "11.1.0",
84-
"postcss-loader": "2.1.1",
8582
"rimraf": "2.6.2",
8683
"robotstxt-webpack-plugin": "4.0.1",
84+
"sass-loader": "6.0.7",
8785
"style-loader": "0.20.3",
8886
"stylelint": "9.1.3",
8987
"stylelint-config-standard": "18.2.0",
@@ -95,7 +93,7 @@
9593
},
9694
"dependencies": {
9795
"babel-polyfill": "6.26.0",
98-
"bootstrap": "next",
96+
"bootstrap": "4.0.0",
9997
"classnames": "2.2.5",
10098
"fetch-everywhere": "1.0.5",
10199
"form2js": "1.0.0",

‎postcss.config.js

-15
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
form:not(.u-validate) input:invalid {
22
background-color: #fafad2;
3-
border: 1px solid var(--COLOR_BRAND_PRIMARY);
3+
border: 1px solid $COLOR_BRAND_PRIMARY;
44
}

‎src/assets/styles/components/inputField.css ‎src/assets/styles/components/inputField.scss

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
.inputField-input {
77
appearance: none;
88
background-color: #ffffff;
9-
border: 1px solid var(--COLOR_DARKGRAY_MEDIUM);
10-
box-shadow: inset 0 0 0 1px color(var(--COLOR_PRIMARY) alpha(0%));
9+
border: 1px solid $COLOR_DARKGRAY_MEDIUM;
10+
box-shadow: inset 0 0 0 1px rgba($COLOR_PRIMARY, 0);
1111
font-size: 16px;
1212
max-width: 100%;
1313
padding: 9px;
1414
transition:
15-
border-color 300ms var(--EASE_IN_QUAD),
16-
box-shadow 300ms var(--EASE_IN_QUAD);
15+
border-color 300ms $EASE_IN_QUAD,
16+
box-shadow 300ms $EASE_IN_QUAD;
1717

1818
&:focus {
19-
border-color: var(--COLOR_PRIMARY);
20-
box-shadow: inset 0 0 0 1px color(var(--COLOR_PRIMARY) alpha(100%));
19+
border-color: $COLOR_PRIMARY;
20+
box-shadow: inset 0 0 0 1px rgba($COLOR_PRIMARY, 100%);
2121
transition:
22-
border-color 250ms var(--EASE_OUT_QUAD),
23-
box-shadow 250ms var(--EASE_OUT_QUAD);
22+
border-color 250ms $EASE_OUT_QUAD,
23+
box-shadow 250ms $EASE_OUT_QUAD;
2424
}
2525
}
2626

@@ -36,5 +36,5 @@
3636
}
3737

3838
.inputField_noLabel .inputField-label {
39-
@apply --isVisuallyHidden;
39+
@include isVisuallyHidden;
4040
}

‎src/assets/styles/components/modal.css ‎src/assets/styles/components/modal.scss

+3-28
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,7 @@
66
position: fixed;
77
right: 0;
88
top: 0;
9-
z-index: var(--Z_INDEX_MODAL);
10-
11-
@media (--SM) {
12-
padding-top: 50px;
13-
}
14-
15-
@media (--MD) {
16-
padding-top: 100px;
17-
}
9+
z-index: 6;
1810
}
1911

2012
.modal-overlay {
@@ -23,11 +15,10 @@
2315
bottom: 0;
2416
cursor: pointer;
2517
left: 0;
26-
opacity: 0;
2718
position: fixed;
2819
right: 0;
2920
top: 0;
30-
z-index: var(--Z_INDEX_MODAL_OVERLAY);
21+
z-index: 7;
3122
}
3223

3324
.modal-overlay_required {
@@ -46,23 +37,12 @@
4637
margin: auto auto 5px;
4738
max-width: 800px;
4839
min-height: 250px;
49-
opacity: 0;
5040
overflow: hidden;
5141
padding: 20px;
5242
position: relative;
5343
transform: translateY(-5px);
5444
width: calc(100% - 10px);
55-
z-index: var(--Z_INDEX_MODAL_CONTENT);
56-
57-
@media (--SM) {
58-
margin-bottom: 20px;
59-
transform: translateY(-50px);
60-
}
61-
62-
@media (--MD) {
63-
margin-bottom: 20px;
64-
transform: translateY(-100px);
65-
}
45+
z-index: 8;
6646
}
6747

6848
.modal-content_sm {
@@ -148,11 +128,6 @@
148128
.modal-footer_stack {
149129
display: block;
150130

151-
@media (--XS) {
152-
display: flex;
153-
justify-content: flex-end;
154-
}
155-
156131
& > * {
157132
margin-bottom: 10px;
158133
width: 100%;

‎src/assets/styles/helpers/easing.css

-9
This file was deleted.

‎src/assets/styles/helpers/easing.scss

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* stylelint-disable number-no-trailing-zeros */
2+
$EASE_IN_QUAD: cubic-bezier(0.550, 0.085, 0.680, 0.530);
3+
$EASE_OUT_QUAD: cubic-bezier(0.250, 0.460, 0.450, 0.940);
4+
$EASE_OUT_CUBIC: cubic-bezier(0.215, 0.610, 0.355, 1.000);

‎src/assets/styles/helpers/utils.css

-22
This file was deleted.

‎src/assets/styles/helpers/utils.scss

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* utils
2+
------------------------------------------------- */
3+
@mixin isVisuallyHidden() {
4+
border: 0;
5+
clip: rect(0 0 0 0);
6+
height: 1px;
7+
margin: -1px;
8+
overflow: hidden;
9+
padding: 0;
10+
position: absolute;
11+
width: 1px;
12+
}
13+
14+
.u-isHidden {
15+
display: none !important;
16+
}
17+
18+
.u-isVisuallyHidden {
19+
@include isVisuallyHidden;
20+
}

‎src/assets/styles/helpers/vars.css

-32
This file was deleted.

‎src/assets/styles/helpers/vars.scss

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* vars
2+
------------------------------------------------- */
3+
$COLOR_PRIMARY: rgb(0, 200, 230);
4+
$COLOR_SECONDARY: rgb(0, 60, 230);
5+
$COLOR_BRAND_PRIMARY: rgb(255, 0, 0);
6+
$COLOR_DARKGRAY_MEDIUM: rgb(112, 112, 112);
7+
8+
$XS: 32.5rem;
9+
$SM: 48rem;
10+
$MD: 60rem;
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
1-
@import "styles";
2-
3-
/* base
4-
------------------------------------------------- */
5-
@import "base/elements";
6-
7-
/* helpers
8-
------------------------------------------------- */
9-
@import "helpers/easing";
101
@import "helpers/vars";
112
@import "helpers/utils";
12-
13-
/* components
14-
------------------------------------------------- */
3+
@import "helpers/easing";
4+
@import "base/elements";
155
@import "components/inputField";
166
@import "components/modal";
177
@import "components/modalForm";
8+
@import "styles";
File renamed without changes.

‎src/client.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'bootstrap/dist/css/bootstrap.css';
2-
import './assets/styles/screen.css';
2+
import './assets/styles/screen.scss';
33

44
import 'fetch-everywhere';
55
import React from 'react';

‎webpack.config.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const webpackConfig = {
4646
module: {
4747
rules: [
4848
{
49-
test: /\.css$/,
49+
test: /\.s?css$/,
5050
use: ['css-hot-loader'].concat(
5151
ExtractTextPlugin.extract({
5252
fallback: 'style-loader',
@@ -59,13 +59,10 @@ const webpackConfig = {
5959
},
6060
},
6161
{
62-
loader: 'postcss-loader',
62+
loader: 'sass-loader',
6363
options: {
64-
sourceMap: !isProduction,
65-
config: {
66-
path: './postcss.config.js',
67-
},
68-
},
64+
sourceMap: !isProduction
65+
}
6966
},
7067
],
7168
})

0 commit comments

Comments
 (0)