#How do I deal with a default theme's obfuscated css?
34 messages · Page 1 of 1 (latest)
place all base, reset, and frameworks style in to css @layer
for example:
@layer framework.starlight {
@import "...starlight.scss";
}
layered styles has lower specify
and right all ur components not layerd.
ez override. ez reading. ez af
im not that deep into astro yet. idk what that means. i just expected something like how this works
a[id^="tab-"] {
color: var(--embed-title) !important;
padding-bottom: 0.2em !important;
background-color: var(--background-tertiary) !important;
}
it's not astro stuff. its pure css
level up! )
i dont understand what to do with this information
like first off, where does the text that comes after @layer come from?
@layer tab?
ok. lets try another way
u need got works this?
a[id^="tab-"] {
color: var(--embed-title) !important;
padding-bottom: 0.2em !important;
background-color: var(--background-tertiary) !important;
}
yes it does what i need it do do. its the consistent style no matter the state
then what's wrong?
i now want to do this
.tab:where(.astro-esqgolmp) > :where(.astro-esqgolmp)[role="tab"][aria-selected="true"] {
border-bottom: 4px solid var(--brand-500);
}
but its obfuscated classes
selector :where has zero specifity
its just way for scoping in astro
try
:is(.tab, #important) > [role="tab"][aria-selected="true"] {
border-bottom: 4px solid var(--brand-500);
}
wait im trying to understand the scss thing. i feel like im close
@tailwind base;
@tailwind components;
@tailwind utilities;
.inline-icon {
@apply inline-block align-middle !important;
}
@layer components {
.tab {
> [role="tab"] {
color: var(--embed-title) !important;
padding-bottom: 0.2em !important;
background-color: var(--background-tertiary) !important;
&[aria-selected="true"] {
border-bottom: 4px solid var(--brand-500) !important;
}
}
}
}
but that gives me
[WARN] [vite] [vite:css] Nested CSS was detected, but CSS nesting has not been configured correctly.
Please enable a CSS nesting plugin before Tailwind in your configuration.
See how here: https://tailwindcss.com/docs/using-with-preprocessors#nesting
did u install sass to ur project? )
no i thought that was already built in
@tailwind base;
@tailwind components;
@tailwind utilities;
.inline-icon {
@apply inline-block align-middle !important;
}
:is(.tab, #important) > [role="tab"] {
color: var(--embed-title);
padding-bottom: 0.2em;
background-color: var(--background-tertiary);
}
:is(.tab, #important) > [role="tab"][aria-selected="true"] {
border-bottom: 4px solid var(--brand-500);
}
try this. pure css