-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
13 trucks carousel #82
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
43321a4
truck carousel first draft
kesiah ed93659
merge branches
kesiah 4c04ec5
truck carousel
kesiah 97c9ecb
styles
kesiah 14368a6
allow icon in navigation tab
kesiah 4b3ff6d
adjust image size
kesiah 09de956
rename function name
kesiah 9e887db
allow one image only for mobile & desktop
kesiah 0431deb
order css
kesiah cd84d58
Merge branch 'develop' of github.com:Netcentric/vg-macktrucks-com-rd …
kesiah 9e2d8b5
icon size
kesiah 18313f8
fix resize
kesiah 6dd0704
adjust width
kesiah 5707516
fix based on comments
kesiah 67a6202
change icon color
kesiah 14259d0
Merge branch 'develop' of github.com:Netcentric/vg-macktrucks-com-rd …
kesiah d4f36aa
improve code
kesiah fb3cdac
fix bold button
kesiah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,308 @@ | ||
:root { | ||
--truck-lineup-img-width: 60%; | ||
--truck-lineup-navigation-icon: 10px; | ||
} | ||
|
||
@keyframes truck-entry { | ||
0% { | ||
transform: translateX(100%); | ||
opacity: 0; | ||
} | ||
|
||
25% { | ||
opacity: 1; | ||
} | ||
|
||
100% { | ||
transform: translateX(0); | ||
} | ||
} | ||
|
||
/* Full width block */ | ||
main .section.v2-truck-lineup-container .v2-truck-lineup-wrapper { | ||
margin: 0; | ||
padding: 0; | ||
width: 100%; | ||
max-width: none; | ||
} | ||
|
||
main .section.v2-truck-lineup-container { | ||
padding: 0; | ||
} | ||
|
||
/* End Full width block */ | ||
|
||
.v2-truck-lineup { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.v2-truck-lineup__images-container, | ||
.v2-truck-lineup__description-container { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
padding-left: 0; | ||
margin: 0; | ||
} | ||
|
||
.v2-truck-lineup__description-container { | ||
order: 2; | ||
overflow: hidden; | ||
} | ||
|
||
.v2-truck-lineup__images-container { | ||
align-items: flex-end; | ||
overflow: scroll hidden; | ||
scroll-behavior: smooth; | ||
scroll-snap-type: x mandatory; | ||
scrollbar-width: none; | ||
} | ||
|
||
.v2-truck-lineup__images-container::-webkit-scrollbar { | ||
display: none; | ||
} | ||
|
||
.v2-truck-lineup__image-item { | ||
flex: none; | ||
scroll-snap-align: center; | ||
text-align: center; | ||
width: var(--truck-lineup-img-width); | ||
} | ||
|
||
.v2-truck-lineup__image-item picture { | ||
display: block; | ||
animation-duration: 1s; | ||
animation-delay: 0.5s; | ||
animation-name: truck-entry; | ||
animation-timing-function: ease-in; | ||
} | ||
|
||
.v2-truck-lineup__image-item:first-child { | ||
margin-left: 50vw; | ||
} | ||
|
||
.v2-truck-lineup__images-container::after { | ||
content: ''; | ||
display: block; | ||
flex: 0 0 50vw; | ||
} | ||
|
||
.v2-truck-lineup__image-item img { | ||
aspect-ratio: 16 / 9; | ||
max-height: 80vh; | ||
width: auto; | ||
} | ||
|
||
.v2-truck-lineup__content { | ||
margin: 0 auto 32px; | ||
text-align: center; | ||
width: 90%; | ||
} | ||
|
||
.v2-truck-lineup__desc-item { | ||
color: var(--text-color); | ||
flex: none; | ||
opacity: 0; | ||
width: 100%; | ||
|
||
/* fadeout */ | ||
transition: opacity 0.3s cubic-bezier(0, 0, 0, 1); | ||
} | ||
|
||
.v2-truck-lineup__desc-item.active { | ||
opacity: 1; | ||
transition: opacity 0.5s cubic-bezier(0, 0, 0, 1) 0.5s; | ||
} | ||
|
||
.v2-truck-lineup__text { | ||
margin: 0 auto; | ||
max-width: 400px; | ||
text-wrap: balance; | ||
} | ||
|
||
.v2-truck-lineup__title { | ||
font-family: var(--ff-headline-medium); | ||
font-size: 45px; | ||
letter-spacing: -0.9px; | ||
line-height: 117%; | ||
margin: 0; | ||
} | ||
|
||
.v2-truck-lineup__buttons-container { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 16px; | ||
justify-content: center; | ||
margin-top: 32px; | ||
} | ||
|
||
.v2-truck-lineup__buttons-container a.button, | ||
.v2-truck-lineup__buttons-container .button-container { | ||
margin: 0; | ||
} | ||
|
||
/* Navigation */ | ||
.v2-truck-lineup__navigation::-webkit-scrollbar { | ||
display: none; | ||
} | ||
|
||
ul.v2-truck-lineup__navigation { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
list-style: none; | ||
margin: 32px 0; | ||
order: 0; | ||
overflow: auto; | ||
padding: 2px 32px; | ||
position: relative; | ||
} | ||
|
||
.v2-truck-lineup__navigation-line { | ||
background: var(--c-primary-black); | ||
bottom: 3px; | ||
height: 3px; | ||
left: 0; | ||
margin: 0; | ||
position: absolute; | ||
transition: all var(--duration-small) var(--easing-standard); | ||
width: 0; | ||
} | ||
|
||
.v2-truck-lineup__navigation::before, | ||
.v2-truck-lineup__navigation::after { | ||
content: ''; | ||
margin: auto; | ||
} | ||
|
||
.v2-truck-lineup__navigation-item { | ||
border-bottom: 1px solid var(--c-primary-black); | ||
} | ||
|
||
.v2-truck-lineup__navigation-item.active button, | ||
.v2-truck-lineup__navigation-item button:hover { | ||
--color-icon: var(--c-accent-copper); | ||
|
||
color: var(--c-primary-black); | ||
} | ||
|
||
/* stylelint-disable-next-line no-descending-specificity */ | ||
.v2-truck-lineup__navigation-item button { | ||
--color-icon: var(--c-secondary-steel); | ||
|
||
background: 0 0; | ||
border: none; | ||
color: var(--c-secondary-steel); | ||
display: flex; | ||
font-family: var(--ff-subheadings-medium); | ||
font-size: var(--headline-5-font-size); | ||
line-height: var(--headline-5-line-height); | ||
margin: 0 0 0 20px; | ||
padding: 14px 0; | ||
text-wrap: nowrap; | ||
} | ||
|
||
.v2-truck-lineup__navigation-item:first-child button { | ||
margin-left: 0; | ||
} | ||
|
||
.v2-truck-lineup__navigation-item .icon { | ||
display: inline-flex; | ||
height: var(--truck-lineup-navigation-icon); | ||
width: var(--truck-lineup-navigation-icon); | ||
} | ||
|
||
/* Arrow controls */ | ||
.v2-truck-lineup__slider-wrapper { | ||
order: 1; | ||
position: relative; | ||
} | ||
|
||
.v2-truck-lineup__arrow-controls { | ||
display: none; | ||
margin: 0; | ||
opacity: 0; | ||
transition: opacity var(--duration-small) var(--easing-standard); | ||
} | ||
|
||
.v2-truck-lineup__slider-wrapper:hover .v2-truck-lineup__arrow-controls { | ||
opacity: 1; | ||
} | ||
|
||
.v2-truck-lineup__arrow-controls li { | ||
align-items: center; | ||
display: flex; | ||
height: 100%; | ||
left: 10%; | ||
position: absolute; | ||
top: 0; | ||
} | ||
|
||
.v2-truck-lineup__arrow-controls li:last-child { | ||
left: auto; | ||
right: 10%; | ||
} | ||
|
||
/* stylelint-disable-next-line no-descending-specificity */ | ||
.v2-truck-lineup__arrow-controls button { | ||
background-color: var(--c-primary-white); | ||
border: 1px solid var(--c-primary-black); | ||
color: var(--c-primary-black); | ||
font-size: 0; | ||
line-height: 0; | ||
margin: 0; | ||
padding: 16px; | ||
position: relative; | ||
} | ||
|
||
.v2-truck-lineup__arrow-controls button:hover { | ||
background-color: #F1F1F1; | ||
border-color: #A7A8A9; | ||
} | ||
|
||
.v2-truck-lineup__arrow-controls button:active { | ||
background-color: #E1DFDD; | ||
border-color: #D9D9D9; | ||
} | ||
|
||
.v2-truck-lineup__arrow-controls button:focus { | ||
outline: 2px solid var(--border-focus); | ||
} | ||
|
||
@media screen and (min-width: 744px) { | ||
.v2-truck-lineup__navigation-item button { | ||
font-size: var(--headline-4-font-size); | ||
line-height: var(--headline-4-line-height); | ||
} | ||
|
||
.v2-truck-lineup__arrow-controls { | ||
display: block; | ||
} | ||
} | ||
|
||
@media screen and (min-width: 1200px) { | ||
:root { | ||
--truck-lineup-img-width: 60%; | ||
--truck-lineup-navigation-icon: 15px; | ||
} | ||
|
||
.v2-truck-lineup__content { | ||
max-width: var(--truck-lineup-img-width); | ||
} | ||
|
||
.v2-truck-lineup__content .default-content-wrapper { | ||
align-items: flex-start; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.v2-truck-lineup__text { | ||
flex-basis: 60%; | ||
margin: 0; | ||
text-align: left; | ||
} | ||
|
||
.v2-truck-lineup__buttons-container { | ||
flex-direction: row; | ||
margin-top: 0; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you reset the
font-weight
here to get rid of faux bold?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of changing this button, I updated in styles, because by default button is using font-family Helvetica Roman, so the weight there was already wrong.