Skip to content

Commit 261ad58

Browse files
committed
minor #2465 [Site] Visual improvments on IconModal (Kocal)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Site] Visual improvments on IconModal | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> The `lightsky` color was hard to read on a grey background, I changed it to the Bootstrap code color and it is better (it still does not pass accessibility tests, but that's better). I also changed the active `Tab` background-color: <img width="1800" alt="Capture d’écran 2024-12-23 à 09 18 52" src="https://github.com/user-attachments/assets/abffd1b2-17be-419b-a6ae-7281d82b65fe" /> On mobile, or resized window, opening and use the `IconModal` was not convenient, so I adapted it: <img width="1800" alt="Capture d’écran 2024-12-23 à 09 17 41" src="https://github.com/user-attachments/assets/d84d4af2-66e4-404d-b032-46a41bca2a76" /> Commits ------- 610db72 [Site] Improve IconModal display on mobile 21d9557 [Site] Improve contrast on IconModal
2 parents f8ed736 + 610db72 commit 261ad58

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

ux.symfony.com/assets/styles/components/_IconModal.scss

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
min-height: 1rem;
1616
max-width: 100vw;
1717
max-height: 100vh;
18-
overflow: clip;
18+
overflow: auto;
1919
padding: 1rem 1.5rem;
2020
background: var(--bs-body-bg);
2121
color: var(--bs-body-color);
@@ -59,7 +59,6 @@
5959

6060
.IconModal__body {
6161
display: grid;
62-
grid-template-columns: 300px 1fr;
6362
gap: 1.5rem;
6463
}
6564

@@ -176,7 +175,7 @@
176175
padding: 0.35rem 0.5rem;
177176
border-radius: .5rem;
178177
border: 1px solid var(--bs-dark-border-subtle);
179-
background: var(--bs-secondary-bg-subtle);
178+
background: var(--bs-secondary-bg);
180179
overflow: hidden;
181180
position: relative;
182181
opacity: .8;
@@ -212,7 +211,7 @@
212211
}
213212

214213
.IconModal__code span {
215-
color: lightskyblue;
214+
color: var(--bs-code-color);
216215
}
217216

218217
.IconModal__copy {
@@ -239,3 +238,20 @@
239238
padding-top: 0;
240239
}
241240

241+
.IconModal__main .TabBody {
242+
padding-block-end: 0;
243+
}
244+
245+
@media screen and (max-width: 768px) {
246+
.IconModal {
247+
padding: .5rem;
248+
margin: .5rem;
249+
width: auto;
250+
height: auto;
251+
}
252+
}
253+
@media screen and (min-width: 768px) {
254+
.IconModal__body {
255+
grid-template-columns: 300px 1fr;
256+
}
257+
}

ux.symfony.com/assets/styles/components/_Tabs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
transition: background-color 150ms ease-in-out;
3131
}
3232
.TabControl.active {
33-
background: var(--bs-secondary-bg);
33+
background: var(--bs-tertiary-bg);
3434
}
3535

3636
.TabPanel {

0 commit comments

Comments
 (0)