linkedin / linkedin/css-blocks
State namespace alias
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.3k
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
The state namespace should be something that can be aliased according to dev/team preferences as an authoring convenience.
```css
@namespace s url(http://css-blocks.com/state);
:scope[s|active] { font-weight: bold; }
```
We should also allow states from a block (which are element names in selectors) to have a namespace declared:
```css
@block-reference theme|button from "design-system/button.block.scss";
@namespace s url(http://css-blocks.com/state);
:scope[s|active] { font-weight: bold; font-weight: resolve("theme|button[s|clicked]")}
```
In reference to https://github.com/css-blocks/css-blocks/issues/96, this would allow us to have a way of making a reference to a collection of blocks:
@block-reference theme|* from "design-system/all.block.scss";
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reading the requested syntax here and the referenced issue #96, then trace how namespaces, block references, and state selectors are currently handled. Done means aliases work for the state namespace and namespaced states from referenced blocks support both selectors and resolve() references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100