Skip to content
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

Hotfix/block styles template #40

Merged
merged 13 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ To use the responsive mixin, include it in your SCSS code and customize it accor
}

// Apply styles when the screen width is between 600px and 1200px
@include responsive-min(600px) and (max-width: 1200px) {
@include responsive-range(600px, 1200px) {
/* Your responsive styles for a range of widths */
}
}
Expand Down
2 changes: 2 additions & 0 deletions assets/js/global/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ function handleScroll() {

if (scrollTop > lastScrollTop) {
siteHeader.style.top = '-100%';
siteHeader.classList.add('scrolled');
} else {
siteHeader.style.top = '0';
siteHeader.classList.remove('scrolled');
}

lastScrollTop = scrollTop;
Expand Down
33 changes: 20 additions & 13 deletions assets/scss/abstracts/responsive-mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

/*
.my-element {
width: 100%;
width: 100%;

// Apply styles when the screen width is 600px or more.
@include responsive-min(600px) {
// Your responsive styles for min-width: 600px.
}
// Apply styles when the screen width is 600px or more.
@include responsive-min(600px) {
// Your responsive styles for min-width: 600px.
}

// Apply styles when the screen width is up to 600px
@include responsive-max(600px) {
// Your responsive styles for max-width: 600px.
}
// Apply styles when the screen width is up to 600px
@include responsive-max(600px) {
// Your responsive styles for max-width: 600px.
}

// Apply styles when the screen width is between 600px and 1200px.
@include responsive-min(600px) and (max-width: 1200px) {
// Your responsive styles for a range of widths.
}
// Apply styles when the screen width is between 600px and 1200px.
@include responsive-range(600px, 1200px) {
// Your responsive styles for a range of widths.
}
}
*/

Expand All @@ -34,3 +34,10 @@
@content;
}
}

// Define mixin for media queries with min and max width (range)
@mixin responsive-range($min-width, $max-width) {
@media only screen and (min-width: $min-width) and (max-width: $max-width) {
@content;
}
}
12 changes: 10 additions & 2 deletions assets/scss/blocks/core/file.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,28 @@
}

.wp-block-file__button {
align-items: center;
display: inline-flex;
justify-content: center;
margin-left: 1.5rem;
position: relative;
z-index: 1;

&::after {
background-color: currentcolor;
content: '';
display: inline-block;
height: 1rem;
left: unset;
margin-left: 0.5rem;
margin-top: -0.125rem;
margin-right: unset;
mask-image: url(../../../images/icons/icon-download.svg);
mask-size: contain;
position: relative;
position: absolute;
right: 0.75rem;
vertical-align: middle;
width: 1rem;
z-index: 0;
}
}

Expand Down
Loading
Loading