-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve audio-tactile card page styling
- Loading branch information
Showing
11 changed files
with
235 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div class="sections-control"> | ||
<button class="sections-control__expand-all">{{ translations[lang].expandAll }}</button> | ||
<button class="sections-control__collapse-all">{{ translations[lang].collapseAll }}</button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.audio-tactile { | ||
.card__content { | ||
display: none; | ||
} | ||
|
||
.card__content--show .card__content { | ||
display: block; | ||
} | ||
|
||
.card__toggle { | ||
background: $sectionBGColour; | ||
border: solid $darkRed 2px; | ||
display: block; | ||
padding: 0; | ||
width: 100%; | ||
} | ||
|
||
.card__title { | ||
background-color: var(--fl-buttonFgColor, $sectionBorderColour); | ||
color: $sectionBGColour; | ||
margin: 0; | ||
width: 100%; | ||
} | ||
|
||
.card__icon { | ||
align-items: center; | ||
display: block; | ||
min-width: 3.75rem; | ||
|
||
svg { | ||
--icon-arrowColour: #{$darkRed}; | ||
|
||
color: var(--fl-bgColor, $mainColour); | ||
fill: none; | ||
height: 2rem; | ||
transform: rotate(90deg); | ||
width: 1.75rem; | ||
} | ||
} | ||
|
||
.card__toggle--expanded .card__icon svg { | ||
transform: rotate(-90deg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.audio-tactile { | ||
.section__subsections { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.section:not(:last-child) { | ||
margin-block-end: 3rem; | ||
} | ||
|
||
.section__toggle { | ||
margin-block-end: 0; | ||
} | ||
|
||
.section__content { | ||
background: $sectionBGColour; | ||
padding: 1rem; | ||
} | ||
|
||
.section__description { | ||
padding: 1rem 2.75rem; | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
src/assets/styles/components/_audio-tactile-subsection.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
.audio-tactile { | ||
.subsection__heading { | ||
line-height: calc(var(--fl-lineSpace-factor, 1) * 0.8); | ||
margin: 0; | ||
} | ||
|
||
.subsection__toggle { | ||
align-items: stretch; | ||
background-color: var(--fl-buttonBgColor, $sectionBGColour); | ||
border: none; | ||
color: var(--fl-buttonFgColor, $mainColour); | ||
cursor: pointer; | ||
display: flex; | ||
font-size: var(--fl-enhance-font-size, 1.8125rem); | ||
font-weight: var(--fl-enhance-font-weight, 700); | ||
justify-content: space-between; | ||
line-height: calc(var(--fl-lineSpace-factor, 1) * 1.45); | ||
margin-block-end: 1.25rem; | ||
padding: 0; | ||
width: 100%; | ||
|
||
&:focus, | ||
&:hover { | ||
outline-color: var(--fl-buttonFgColor); | ||
} | ||
|
||
&--expanded .subsection__title, | ||
&:focus .subsection__title, | ||
&:hover .subsection__title { | ||
border: 0.35rem solid var(--fl-buttonFgColor, $sectionBorderColour); | ||
border-inline-start: none; | ||
padding: 0.7125rem 1rem 0.7125rem 1.25rem; | ||
} | ||
} | ||
|
||
.subsection__title { | ||
border: 0.0625rem dashed var(--fl-buttonBgColor, $sectionBorderColour); | ||
border-inline-start: none; | ||
line-height: 1.875rem; | ||
padding: 1rem 1rem 1rem 1.25rem; | ||
text-align: start; | ||
width: 100%; | ||
} | ||
|
||
.subsection__icon { | ||
align-items: center; | ||
background-color: var(--fl-buttonFgColor, $sectionBorderColour); | ||
display: flex; | ||
font-size: var(--fl-enhance-font-size, 1.125rem); | ||
font-weight: var(--fl-enhance-font-weight, 800); | ||
justify-content: center; | ||
min-width: 3.75rem; | ||
|
||
svg { | ||
--icon-arrowColour: var(--fl-buttonBgColor, #fff); | ||
|
||
color: var(--fl-bgColor, $mainColour); | ||
fill: none; | ||
height: 2rem; | ||
width: 1.75rem; | ||
} | ||
} | ||
|
||
.subsection__toggle--expanded .subsection__icon svg { | ||
transform: rotate(90deg); | ||
} | ||
|
||
.subsection__content { | ||
display: none; | ||
} | ||
|
||
.subsection__content--show .subsection__content { | ||
display: block; | ||
} | ||
|
||
.subsection__cards { | ||
display: grid; | ||
gap: 3rem; | ||
grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); | ||
list-style: none; | ||
margin: 0; | ||
margin-block-end: 2.5rem; | ||
padding: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.sections-control { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 1.25rem; | ||
margin-block-end: 1.5rem; | ||
margin-block-start: 2rem; | ||
} | ||
|
||
.sections-control__collapse-all, | ||
.sections-control__expand-all { | ||
background: var(--fl-buttonBgColor, $rootContentBackgroundColour); | ||
border: 1px solid $mainColour; | ||
color: var(--fl-buttonFgColor, $mainColour); | ||
cursor: pointer; | ||
flex-basis: 0; | ||
flex-grow: 1; | ||
font-size: 1.125rem; | ||
font-weight: var(--fl-enhance-font-weight, 600); | ||
line-height: calc(var(--fl-lineSpace-factor, 1) * 1.875); | ||
padding: 0.375rem 1.5rem; | ||
|
||
&:focus, | ||
&:hover { | ||
border: 0.1875rem solid var(--fl-buttonFgColor, $mainColour); | ||
box-sizing: border-box; | ||
padding: 0.25rem 1.375rem; | ||
} | ||
} | ||
|
||
@include breakpoint-up(md) { | ||
.sections-control__collapse-all, | ||
.sections-control__expand-all { | ||
flex-basis: unset; | ||
flex-grow: unset; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,37 @@ | ||
.audio-tactile main { | ||
background: $darkGrey; | ||
grid-template-columns: unset; | ||
max-width: unset; | ||
padding: 2rem; | ||
} | ||
.audio-tactile { | ||
main { | ||
background: $darkGrey; | ||
grid-template-columns: unset; | ||
max-width: unset; | ||
padding: 2rem; | ||
} | ||
|
||
.audio-tactile .footer { | ||
margin-block-start: 0; | ||
} | ||
.footer { | ||
margin-block-start: 0; | ||
} | ||
|
||
.audio-tactile__title { | ||
font-size: 3rem; | ||
font-weight: 700; | ||
hyphens: auto; | ||
line-height: 3.5rem; | ||
word-break: break-word; | ||
} | ||
.audio-tactile__title { | ||
font-size: 3rem; | ||
font-weight: 700; | ||
hyphens: auto; | ||
line-height: 3.5rem; | ||
word-break: break-word; | ||
} | ||
|
||
.audio-tactile__intro { | ||
font-size: 1.25rem; | ||
} | ||
.audio-tactile__intro { | ||
font-size: 1.25rem; | ||
} | ||
|
||
.audio-tactile__credits { | ||
font-size: 1.25rem; | ||
grid-row: 8; /* show the credits after all other page content */ | ||
margin-inline: auto; | ||
max-width: $narrow-content-width; | ||
} | ||
|
||
.audio-tactile__sections { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.audio-tactile__credits { | ||
font-size: 1.25rem; | ||
grid-row: 8; /* show the credits after all other page content */ | ||
margin-inline: auto; | ||
max-width: $narrow-content-width; | ||
} | ||
|
||
.audio-tactile .section__toggle { | ||
margin-block-end: 0; | ||
.audio-tactile__sections { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters