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

Fix deprecation warnings from SASS #13199

Merged
merged 1 commit into from
Jul 23, 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
18 changes: 9 additions & 9 deletions decidim-core/app/packs/stylesheets/decidim/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@
.dropdown {
@apply absolute border-2 border-gray-3 rounded min-w-max p-4 drop-shadow-md text-left z-10;

/*
NOTE: the calculated value is the sum of the arrow offset position plus the half of the arrow size:
- offset position: 20%
- arrow size: 1.5rem
*/
--arrow-offset: 20%;
--arrow-size: 1.5rem;
--arrow-visible-size: var(--arrow-size) * 0.5;

& > * {
@apply relative z-10 p-3.5 first:pt-1.5 last:pb-1.5;
}
Expand All @@ -90,15 +99,6 @@
}
}

/*
NOTE: the calculated value is the sum of the arrow offset position plus the half of the arrow size:
- offset position: 20%
- arrow size: 1.5rem
*/
--arrow-offset: 20%;
--arrow-size: 1.5rem;
--arrow-visible-size: var(--arrow-size) * 0.5;

&__bottom {
@apply top-full right-0 mt-3 translate-x-[calc(var(--arrow-offset)-var(--arrow-visible-size))] before:content-[''] before:absolute before:right-[var(--arrow-offset)] before:-top-2 before:w-[var(--arrow-size)] before:h-[var(--arrow-size)] before:rotate-45 before:bg-white before:rounded before:border-2 before:border-gray-3 after:content-[''] after:absolute after:left-0 after:top-0 after:w-full after:h-full after:bg-white;
}
Expand Down
8 changes: 4 additions & 4 deletions decidim-core/app/packs/stylesheets/decidim/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@
}

select {
&:not(.reset-defaults) {
@apply pr-8;
}

@apply appearance-none;

background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 12 8'%3e%3cpath fill='%233E4C5C' d='M5.99962 4.97656L10.1246 0.851562L11.303 2.0299L5.99962 7.33323L0.696289 2.0299L1.87462 0.851562L5.99962 4.97656Z'/%3e%3c/svg%3e");
background-position: right 1rem center;
background-repeat: no-repeat;
background-size: 0.75rem;

&:not(.reset-defaults) {
@apply pr-8;
}
}
}

Expand Down
20 changes: 10 additions & 10 deletions decidim-core/app/packs/stylesheets/decidim/_tooltip.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
[role="tooltip"] {
@apply absolute bg-black z-10 px-4 py-2 w-max max-w-xs rounded text-left text-white;

/*
NOTE: the calculated value is the sum of the arrow offset position plus the half of the arrow size:
- offset position: 20%
- arrow size: 16px
*/
--arrow-offset: 20%;
--arrow-size: 16px;
--arrow-visible-size: var(--arrow-size) * 0.5;
--arrow-margin: var(--arrow-visible-size) * 1.4142135623730951; // due to the rotation, the margin is SQRT2 times the visible size

& > * {
@apply relative z-20;
}
Expand Down Expand Up @@ -41,16 +51,6 @@
}
}

/*
NOTE: the calculated value is the sum of the arrow offset position plus the half of the arrow size:
- offset position: 20%
- arrow size: 16px
*/
--arrow-offset: 20%;
--arrow-size: 16px;
--arrow-visible-size: var(--arrow-size) * 0.5;
--arrow-margin: var(--arrow-visible-size) * 1.4142135623730951; // due to the rotation, the margin is SQRT2 times the visible size

&.top {
@apply -translate-x-[calc(100%-var(--arrow-offset))] -translate-y-[calc(100%+var(--arrow-margin))] before:content-[''] before:absolute before:-z-10 before:right-[calc(var(--arrow-offset)-var(--arrow-visible-size))] before:-bottom-[var(--arrow-visible-size)] before:w-[var(--arrow-size)] before:h-[var(--arrow-size)] before:rotate-45 before:bg-black before:rounded-br;
}
Expand Down
Loading