Skip to content

[css-cascade] What is the appropriate syntax for appending to nested layers? #5791

@mirisuzanne

Description

@mirisuzanne

The draft Cascade 5 specification allows nesting cascade layers, and appending styles to nested layers using a dot (. period/full-stop/U+002E) character:

@layer framework {
	@layer default {
		p { margin-block: 0.75em; }
	}

	@layer theme {
		p { color: #222; }
	}
}

/* These styles will be added to the theme layer inside the framework layer */
@layer framework.theme {
	blockquote { color: rebeccapurple; }
}

It might also work to use a space, or some other character in place of the dot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions