Skip to content

Commit

Permalink
Styles improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan-lledo-netcentric committed Nov 8, 2024
1 parent 231d2b3 commit 19fd547
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
32 changes: 32 additions & 0 deletions blocks/cards-multitab/cards-multitab.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,46 @@
justify-content: center;
margin-bottom: 2rem;
list-style: none;
flex-wrap: wrap;
}

.cards-multitab__card-container {
display: flex;
gap: 2rem;
justify-content: center;
flex-wrap: wrap;
width: 100%;
}

.cards-multitab__card {
background-color: var(--background-color);
width: 100%;
}

.cards-multitab__card img {
width: 100%;
}

.cards-multitab__card > div:last-child {
padding: 0 2rem 1rem;
}

.cards-multitab__card--disabled {
display: none;
}

@media (width >= 900px) {
.cards-multitab__card-container {
gap: 1rem;
}

.cards-multitab__card, .cards-multitab__card img {
width: auto;
}
}

@media (width >= 1150px) {
.cards-multitab__card-container {
flex-wrap: nowrap;
}
}
8 changes: 8 additions & 0 deletions blocks/columns/columns.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
order: 1;
}

.columns.bg-white > div {
background-color: var(--background-color);
}

.columns > div > div:last-child {
padding: 0 2rem 1rem;
}

.columns > div > .columns-img-col {
order: 0;
}
Expand Down
4 changes: 4 additions & 0 deletions blocks/columns/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ export default function decorate(block) {
[...block.children].forEach((row) => {
[...row.children].forEach((col) => {
const pic = col.querySelector('picture');
const button = col.querySelector('a');
if (pic) {
const picWrapper = pic.closest('div');
if (picWrapper && picWrapper.children.length === 1) {
// picture is only content in column
picWrapper.classList.add('columns-img-col');
}
}
if (button) {
button.classList.remove('button');
}
});
});
}
2 changes: 1 addition & 1 deletion blocks/header/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ header nav {
box-sizing: border-box;
display: grid;
grid-template:
'hamburger brand tools' var(--nav-height)
'brand tools hamburger' var(--nav-height)
'sections sections sections' 1fr / auto 1fr auto;
align-items: center;
gap: 0 24px;
Expand Down
8 changes: 7 additions & 1 deletion styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,16 @@ main .section.highlight {
}

main .section.card p {
padding: 2rem 10rem;
padding: 2rem;
background-color: var(--background-color);
}

@media (width >= 900px) {
main .section.card p {
padding: 2rem 10rem;
}
}

/* Themes */
body.grey {
background-color: var(--background-grey);
Expand Down

0 comments on commit 19fd547

Please sign in to comment.