Doesn't walk incomplete declaration

Open
#9 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
css, javascript
Domain
tooling

Research direction

Start at src/index.ts#L42 in the linked parser implementation and reproduce the provided CSS input, focusing on the incomplete font-size declaration. Compare the walked declarations with the issue's expected sequence, then verify that incomplete declarations are handled consistently without skipping the following nested rules.

Written by the indexing model from the issue text.

Description

.container {
  max-width: rem(800px);
  margin: 3rem auto 5rem;
  padding: 0 2rem;
  font-size

  @media (max-width: rem(800px)) {
    flex-direction: column;
    margin-top: 0.5rem;
  }
}

It ignores font-size (with or without :, no difference). Mainly I'm using this for autocomplete.
My code is here: https://github.com/subsetcss/parser/blob/master/src/index.ts#L42

walked declarations go from padding to flex-direction.

Dominant language
JavaScript
Stars
127
Forks
13
Avg merge
5h 18m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.