Skip to content

Commit 83427fc

Browse files
create-issue-branch[bot]magdalenajadachMagdalena Jadach
authored
Accessibility: Linter issues with the border, width etc. (#787)
closes #786 --------- Co-authored-by: magdalenajadach <[email protected]> Co-authored-by: Magdalena Jadach <[email protected]>
1 parent 11c9cb8 commit 83427fc

Some content is hidden

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

42 files changed

+563
-1003
lines changed

.stylelintrc

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
{
22
"enabled": true,
3-
"extends": [
4-
"stylelint-config-recommended-scss"
5-
],
6-
"plugins": [
7-
"stylelint-scss"
8-
],
3+
"extends": ["stylelint-config-recommended-scss"],
4+
"plugins": ["stylelint-scss", "stylelint-use-logical"],
95
"rules": {
106
"block-no-empty": null,
11-
"declaration-block-single-line-max-declarations": 1
7+
"declaration-block-single-line-max-declarations": 1,
8+
"csstools/use-logical": true
129
}
1310
}

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3636

3737
### Added
3838

39+
- Logical properties linter rule (#770)
40+
- Added download panel for sidebar (#744)
3941
- Javascript support for HTML projects (#748)
4042
- DownloadPanel for sidebar (#744)
4143
- Custom events for Log In and Sign Up from DownloadPanel (#744)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Styles from the parent application can be passed to the web component in a few d
113113
// enables the parent application to control the size of the web components root element
114114
display: block;
115115
flex: 1 1 auto;
116-
max-height: 100dvh;
116+
max-block-size: 100dvh;
117117
}
118118
```
119119

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"lint": "eslint \"src/**/*.{js,jsx,json}\"",
8686
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,json}\"",
8787
"format": "prettier --write src/**/*.{js,jsx,css,md,json,scss} --config ./.prettierrc",
88-
"stylelint": "stylelint --syntax=scss src/**/*.scss",
88+
"stylelint": "stylelint src/**/*.scss",
8989
"test": "node scripts/test.js --transformIgnorePatterns 'node_modules/(?!three)/'",
9090
"test:integration": "cd e2e; docker compose up --exit-code-from cypress",
9191
"storybook": "cd storybook && rm -rf ./node_modules/.cache/storybook && yarn run storybook",
@@ -176,10 +176,11 @@
176176
"storybook-addon-react-router-v6": "^0.2.1",
177177
"style-it": "^2.1.4",
178178
"style-loader": "1.3.0",
179-
"stylelint": "^10.1.0",
179+
"stylelint": "^15.11.0",
180180
"stylelint-config-recommended-scss": "3.3.0",
181181
"stylelint-order": "2.2.1",
182182
"stylelint-scss": "3.12.0",
183+
"stylelint-use-logical": "^2.1.0",
183184
"terser-webpack-plugin": "4.2.3",
184185
"url-loader": "4.1.1",
185186
"webgl-mock-threejs": "^0.0.1",

src/assets/stylesheets/App.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ body,
6868
#root,
6969
#app {
7070
overflow: auto;
71-
height: 100%;
72-
height: -moz-available;
73-
height: -webkit-fill-available;
74-
height: fill-available;
75-
height: 100dvh;
71+
block-size: 100%;
72+
block-size: -moz-available;
73+
block-size: -webkit-fill-available;
74+
block-size: fill-available;
75+
block-size: 100dvh;
7676
-ms-overflow-style: none; /* Remove scrollbar for IE and Edge */
7777
scrollbar-width: none; /* Remove scroll bar for Firefox */
7878
}

src/assets/stylesheets/AstroPiModel.scss

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
@use "./rpf_design_system/colours" as *;
55

66
.sense-hat {
7-
width: 100%;
7+
inline-size: 100%;
88
flex: 1;
99
display: flex;
1010
flex-flow: column;
1111

1212
&-model {
1313
display: flex;
1414
flex-flow: column;
15-
max-height: 50%;
16-
min-height: 200px;
15+
max-block-size: 50%;
16+
min-block-size: 200px;
1717
flex: 1;
1818
padding-block-end: $space-0-5;
1919

@@ -87,11 +87,11 @@
8787
padding-inline: $space-0-5;
8888
box-sizing: border-box;
8989
border-radius: 5px;
90-
width: 32%;
90+
inline-size: 32%;
9191
justify-content: space-between;
9292

9393
&-reading {
94-
width: 100%;
94+
inline-size: 100%;
9595
border-radius: 5px;
9696
margin-block-start: $space-0-25;
9797
padding: $space-0-25;
@@ -105,13 +105,13 @@
105105
&-timer {
106106
margin-block-start: 0;
107107
padding: $space-0-5 0;
108-
width: 100%;
108+
inline-size: 100%;
109109
}
110110
}
111111

112112
&-toggle {
113113
border-radius: 5px;
114-
width: 100%;
114+
inline-size: 100%;
115115
flex: 1;
116116
box-sizing: border-box;
117117
display: flex;
@@ -125,14 +125,14 @@
125125

126126
&-input {
127127
cursor: pointer;
128-
width: 85px;
128+
inline-size: 85px;
129129
transform: rotate(270deg);
130130
}
131131

132132
input[type="color"] {
133133
border-radius: 5px;
134134
flex: 1;
135-
width: 100%;
135+
inline-size: 100%;
136136
padding: $space-0-25 $space-1-5;
137137
}
138138

@@ -149,7 +149,7 @@
149149
&-last {
150150
margin-block-start: $space-0-5;
151151
flex-flow: row;
152-
width: 100%;
152+
inline-size: 100%;
153153
align-items: inherit;
154154
justify-content: space-between;
155155
}
@@ -159,15 +159,15 @@
159159
display: flex;
160160
justify-content: space-between;
161161
.sense-hat-controls-panel__control {
162-
min-height: 175px;
162+
min-block-size: 175px;
163163
}
164164
}
165165

166166
&__container {
167167
display: flex;
168168
flex-flow: column;
169169
align-items: center;
170-
width: 32%;
170+
inline-size: 32%;
171171

172172
.sense-hat-controls-panel__control-name,
173173
input {

src/assets/stylesheets/Button.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
font-weight: $font-weight-bold;
1616
gap: $space-0-5;
1717
justify-content: center;
18-
min-height: 44px;
19-
min-width: 44px;
18+
min-block-size: 44px;
19+
min-inline-size: 44px;
2020
padding: 10px;
2121
position: relative;
2222
text-align: center;
@@ -171,7 +171,7 @@
171171
background-color: inherit;
172172
}
173173
}
174-
174+
175175
&:active {
176176
color: $rpf-teal-900;
177177

@@ -235,8 +235,8 @@
235235
}
236236

237237
&--small {
238-
min-height: unset;
239-
min-width: unset;
238+
min-block-size: unset;
239+
min-inline-size: unset;
240240
}
241241

242242
&--svg-only {

src/assets/stylesheets/ContextMenu.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
white-space: nowrap;
3434
overflow-x: visible;
3535
box-sizing: border-box;
36-
width: 100%;
36+
inline-size: 100%;
3737
justify-content: start;
3838
}
3939

@@ -42,8 +42,8 @@
4242
}
4343

4444
svg {
45-
width: $space-1-5;
46-
height: auto;
45+
inline-size: $space-1-5;
46+
block-size: auto;
4747
}
4848

4949
&--dark {

src/assets/stylesheets/DownloadPanel.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
.download-panel__button {
3131
justify-content: center;
32-
width: 100%;
32+
inline-size: 100%;
3333
box-sizing: border-box;
3434
margin: 0;
3535
}

src/assets/stylesheets/DraggableTabs.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222

2323
.droppable-tab-list {
2424
display: flex;
25-
width: 100%;
25+
inline-size: 100%;
2626
}

src/assets/stylesheets/Dropdown.scss

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
display: flex;
77
justify-content: center;
88
position: relative;
9-
height: 100%;
9+
block-size: 100%;
1010

1111
&-button {
1212
align-items: center;
@@ -31,8 +31,8 @@
3131
inset-block-start: 100%;
3232

3333
&::before {
34-
width: 0;
35-
height: 0;
34+
inline-size: 0;
35+
block-size: 0;
3636
border-inline-start: 15px solid transparent;
3737
border-inline-end: 15px solid transparent;
3838
position: absolute;
@@ -58,7 +58,7 @@
5858
padding: $space-0-5 $space-0-25;
5959
border-radius: 5px;
6060
white-space: nowrap;
61-
width: 100%;
61+
inline-size: 100%;
6262
}
6363
}
6464
}
@@ -67,8 +67,8 @@
6767
position: fixed;
6868
inset-inline-start: 0px;
6969
inset-block-start: 0px;
70-
height: 100%;
71-
width: 100%;
70+
block-size: 100%;
71+
inline-size: 100%;
7272
opacity: 0.5;
7373
z-index: -1;
7474
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.editor-input {
22
display: flex;
33
flex-direction: column;
4-
height: 100%;
5-
width: 100%;
4+
block-size: 100%;
5+
inline-size: 100%;
66
}

src/assets/stylesheets/EmbeddedViewer.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
.embedded-viewer {
44
display: flex;
55
flex: 1 1 auto;
6-
height: auto;
6+
block-size: auto;
77
overflow: hidden;
88

99
.proj-runner-container {
1010
display: flex;
1111
flex: 1 1 auto;
1212
flex-direction: column;
1313
border-radius: 10px;
14-
height: auto;
15-
width: 100%;
14+
block-size: auto;
15+
inline-size: 100%;
1616
}
1717

1818
.pythonrunner-container {

src/assets/stylesheets/FilePanel.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
}
99

1010
.files-list-item {
11-
width: 100%;
11+
inline-size: 100%;
1212
display: flex;
1313
flex-direction: row !important;
1414
justify-content: flex-start;
@@ -19,7 +19,7 @@
1919
box-sizing: border-box;
2020
white-space: nowrap;
2121
font-weight: $font-weight-regular;
22-
min-height: 44px;
22+
min-block-size: 44px;
2323
padding: $space-0-5 $space-2-5 $space-0-5 $space-0-5;
2424
margin: 0;
2525
span {

src/assets/stylesheets/GlobalNav.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
display: flex;
1313
align-items: center;
1414
background-color: $rpf-dark-blue;
15-
height: 100%;
15+
block-size: 100%;
1616
z-index: 2;
1717

1818
&__account {
1919
margin-inline-start: auto;
2020
margin-inline-end: $space-2;
21-
height: 100%;
21+
block-size: 100%;
2222

2323
svg {
2424
fill: $rpf-white;
@@ -37,7 +37,7 @@
3737
}
3838

3939
img {
40-
height: $space-2-5;
40+
block-size: $space-2-5;
4141
margin: $space-0-25 0;
4242
}
4343
}

src/assets/stylesheets/HtmlRunner.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
.htmlrunner-container {
55
container-type: inline-size;
66
display: flex;
7-
height: 100%;
8-
width: 100%;
7+
block-size: 100%;
8+
inline-size: 100%;
99
}
1010

1111
.htmlrunner-link {
@@ -21,6 +21,6 @@
2121
.htmlrunner-iframe {
2222
border: none;
2323
background-color: $rpf-white;
24-
height: 100%;
25-
width: 100%;
24+
block-size: 100%;
25+
inline-size: 100%;
2626
}

0 commit comments

Comments
 (0)