Skip to content

Commit 1eeea64

Browse files
authored
Chore: Update sass, stylelint, focus rings, general SCSS cleanup (#3294)
1 parent 9e308c6 commit 1eeea64

File tree

49 files changed

+1191
-599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1191
-599
lines changed

.stylelintrc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@
33
"extends": ["stylelint-config-standard", "stylelint-config-standard-scss"],
44
"plugins": ["stylelint-prettier"],
55
"rules": {
6+
"alpha-value-notation": null,
7+
"color-function-notation": "legacy",
8+
"declaration-property-value-no-unknown": null,
69
"prettier/prettier": true,
7-
"no-descending-specificity": null
10+
"no-descending-specificity": null,
11+
"selector-class-pattern": [
12+
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*((__([a-z][a-z0-9]*)(-[a-z0-9]+)*)?(--([a-z][a-z0-9]*)(-[a-z0-9]+)*)?)$",
13+
{
14+
"message": "Expected BEM naming convention for class."
15+
}
16+
]
817
}
918
}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ lint: lint-js lint-scss
192192

193193
.PHONY: lint-scss
194194
lint-scss:
195-
@npx stylelint --ignore-path .gitignore "**/*.scss"
195+
@npx stylelint "**/*.scss"
196196

197197
.PHONY: lint-js
198198
lint-js:

RELEASE-NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [v2.23.2]
4+
5+
### Other Changes
6+
7+
- Updated styles, sass, style linting [#3294](https://github.com/Automattic/simplenote-electron/pull/3294)
8+
39
## [v2.23.1]
410

511
### Fixes

lib/alternate-login-prompt/style.scss

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
.alternate-login__overlay {
22
position: fixed;
3-
top: 0;
4-
left: 0;
5-
right: 0;
6-
bottom: 0;
3+
inset: 0;
74
display: flex;
85
justify-content: center;
96
align-items: center;
@@ -59,14 +56,14 @@
5956
padding-top: 10px;
6057
padding-bottom: 10px;
6158
display: flex;
62-
flex-direction: row;
6359
justify-content: flex-end;
64-
flex-wrap: wrap;
60+
flex-flow: row wrap;
6561
width: 100%;
6662

6763
a {
6864
padding-right: 12px;
6965
}
66+
7067
.button-borderless {
7168
color: var(--accent-color);
7269
}

lib/app-layout/style.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../scss/variables' as *;
2+
13
.app-layout {
24
display: flex;
35
flex: 1 0 auto;
@@ -12,6 +14,7 @@
1214
width 0.2s ease-in-out,
1315
opacity 0.2s ease-in-out;
1416
}
17+
1518
.app-layout__note-column {
1619
border-left-width: 0;
1720
transition: border-left-width 0.2s;
@@ -23,6 +26,7 @@
2326
opacity: 1;
2427
width: inherit;
2528
}
29+
2630
.app-layout__note-column {
2731
transition: inherit;
2832
}
@@ -96,10 +100,12 @@
96100
opacity: 1;
97101
transform: scale(1);
98102
}
103+
99104
50% {
100105
opacity: 0.85;
101106
transform: scale(1.05);
102107
}
108+
103109
100% {
104110
opacity: 1;
105111
transform: scale(1);

lib/app.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { Component } from 'react';
22
import { connect } from 'react-redux';
3-
import 'focus-visible/dist/focus-visible.js';
43
import NoteInfo from './note-info';
54
import NoteActions from './note-actions';
65
import NavigationBar from './navigation-bar';

lib/auth/style.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* stylelint-disable-next-line selector-class-pattern */
12
.ReactModal__Overlay {
23
z-index: 1000;
34
}
@@ -168,6 +169,7 @@ body {
168169
line-height: 22px;
169170
text-align: center;
170171
width: 320px;
172+
171173
.button {
172174
width: 95%;
173175
}

lib/components/panel-title/style.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../../scss/variables' as *;
2+
13
.panel-title {
24
color: var(--foreground-color);
35
margin: 0 0 0.5em;

lib/components/slider/style.scss

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,46 @@
1-
.slider {
2-
@extend %smart-focus-outline;
1+
@use '../../../scss/variables' as *;
2+
@use '../../../scss/mixins';
33

4+
.slider {
45
background-color: var(--background-color);
56
cursor: pointer;
67
width: 100%;
78
max-width: $max-content-width;
89
padding: 0; // IE11
910
appearance: none;
1011

12+
&:focus {
13+
outline: 0;
14+
}
15+
16+
&:focus-visible {
17+
outline: $focus-outline;
18+
}
19+
1120
// Track
1221
&::-webkit-slider-runnable-track {
1322
background: var(--primary-slider-color);
1423
height: 4px;
1524
border-radius: 2px;
1625
}
26+
1727
&::-moz-range-track {
1828
background: var(--primary-slider-color);
1929
height: 3px;
2030
border-radius: 2px;
2131
}
32+
2233
&::-ms-track {
2334
border-color: var(--primary-slider-color);
2435
height: 3px;
2536
border-width: 7px 0;
2637
color: transparent;
2738
}
39+
2840
&::-ms-fill-lower {
2941
background: var(--secondary-slider-color);
3042
}
43+
3144
&::-ms-fill-upper {
3245
background: var(--secondary-slider-color);
3346
}
@@ -48,6 +61,7 @@
4861
transform: translateY(calc(-50% + 2px)) scale(1.15);
4962
}
5063
}
64+
5165
&::-moz-range-thumb {
5266
background: var(--secondary-slider-color);
5367
box-shadow: 0 1px 3px 0 var(--overlay-color);
@@ -62,6 +76,7 @@
6276
transform: scale(1.15);
6377
}
6478
}
79+
6580
&::-ms-thumb {
6681
background: var(--secondary-slider-color);
6782
box-shadow: 0 1px 3px 0 var(--overlay-color);
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../../scss/mixins';
2+
13
.transition-delay-enter {
2-
@include react-transition-fade-in;
4+
@include mixins.react-transition-fade-in;
35
}

0 commit comments

Comments
 (0)