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

CSS nesting issues #20

Open
bartveneman opened this issue Dec 12, 2023 · 1 comment
Open

CSS nesting issues #20

bartveneman opened this issue Dec 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@bartveneman
Copy link
Member

bartveneman commented Dec 12, 2023

From nerdy.dev:

@layer base.normalize {
	html {
		--nav-height: 72px;
		view-timeline: document-timeline;

		&:has(.PostList .PostItem:focus-visible) {
			scroll-padding-block-start: calc(var(--nav-height) + var(--size-5));
			scroll-snap-type: y mandatory;

			@media (min-width: 1024px) {
				scroll-padding-block-start: calc(var(--nav-height) + var(--size-9));
			}
		}
	}

	body {
		display: grid;
		grid-template-rows: auto 1fr;
		[data-theme=dark] &:has(.PostDetail .note){background:radial-gradient(circle at 35% 50%,rgba(5,88,255,.15),transparent 50%),radial-gradient(circle at 65% 50%,rgba(128,0,74,.15),transparent 50%),radial-gradient(circle at 50% 65%,rgba(74,128,0,.15),transparent 50%);background-attachment:fixed}@media (prefers-color-scheme:light){&:has(.BlogDetail){background-image:linear-gradient(to bottom,#fff 100vh,300vh,var(--surface-2));background-image:linear-gradient(to bottom,#fff 100vb,300vb,var(--surface-2))}}[data-theme=light] &:has(.BlogDetail){background-image:linear-gradient(to bottom,#fff 100vh,300vh,var(--surface-2));background-image:linear-gradient(to bottom,#fff 100vb,300vb,var(--surface-2))}[data-theme=dark] &:has(.BlogDetail){background-image:none}
	}
}
.sun-and-moon {
		& > :is(.moon, .sun, .sun-beams) {
			transform-origin: center center;
		}

		& > :is(.moon, .sun) {
			fill: var(--icon-fill);
			.theme-toggle:is(:hover,:focus-visible)>&{fill:var(--icon-fill-hover)}
		}

		& > .sun-beams {
			stroke: var(--icon-fill);
			stroke-width: 2px;
			.theme-toggle:is(:hover,:focus-visible) &{stroke:var(--icon-fill-hover)}
		}

		[data-theme=dark] &{&>.sun{transform:scale(1.75)}&>.sun-beams{opacity:0}&>.moon>circle{transform:translateX(-7px);@supports (cx:1){cx:17;transform:translateX(0)}}}@media (prefers-reduced-motion:no-preference){&>.sun{transition:transform .5s var(--ease-elastic-3)}&>.sun-beams{transition:transform .5s var(--ease-elastic-4),opacity .5s var(--ease-3)}& .moon>circle{transition:transform .25s var(--ease-out-5);@supports (cx:1){transition:cx .25s var(--ease-out-5)}}[data-theme=dark] &{&>.sun{transform:scale(1.75);transition-duration:.25s;transition-timing-function:var(--ease-3)}&>.sun-beams{transform:rotate(-25deg);transition-duration:.15s}&>.moon>circle{transition-delay:.25s;transition-duration:.5s}}}
	}
@bartveneman bartveneman added the bug Something isn't working label Dec 12, 2023
@bartveneman
Copy link
Member Author

bartveneman commented Feb 11, 2024

Currently blocked by CSSTree although it's probably fixed in their next release.

bartveneman added a commit that referenced this issue Feb 11, 2024
refs #20

- Adds some (skipped) tests for nested rules
- Fixes spacing around operators in atrule preludes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant