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

Implement support for An+B microsyntax #57

Closed
kasperisager opened this issue Sep 27, 2018 · 2 comments · Fixed by #367
Closed

Implement support for An+B microsyntax #57

kasperisager opened this issue Sep 27, 2018 · 2 comments · Fixed by #367
Assignees

Comments

@kasperisager
Copy link
Contributor

Pseudo-class selectors currently only support values that are either selectors or lists of selectors:

readonly value: Selector | Array<Selector> | null;

However, some functional pseudo-class selectors make use of the An+B microsyntax (https://www.w3.org/TR/css-syntax/#anb), for example :nth-child(2n+1). To support these kinds of selectors, we first need to implement support for this syntax within the selector parser. The lexer can already lex them:

test("Can lex an+b values", t => {
css(t, "2n+4", [
{
type: TokenType.Dimension,
value: 2,
integer: true,
unit: "n"
},
{
type: TokenType.Number,
value: 4,
integer: true
}
]);
});

@2biazdk 2biazdk self-assigned this Sep 27, 2018
@Bugvi-Benjamin-M Bugvi-Benjamin-M self-assigned this Jan 17, 2019
@Bugvi-Benjamin-M
Copy link
Contributor

@2biazdk has been working on this for some time but has been caught up with other stuff that has prevented him from making progress lately. We are going to take a look at this soon.

kasperisager added a commit that referenced this issue Aug 9, 2019
* 'master' of https://github.com/Siteimprove/alfa:
  Correctly account for whitespace
  Include declaration diagnostics
  Improve Jasmine error messages
  Add test case for `<template>` tag
  Adjust argument name
  Adjust some ARIA roles
  No need for a `WeakMap`
  Add missing files to TypeScript configs
  Lint files
  Move some doc files around
  Update dependencies
  Closes #57: Adding support for AnB Microsyntax (#131)
  README updates
  Update README.md
  Closes #78: Generate TODO.md from @todo (and similar) comments (#125)
  Closes #132: Added a few tests regarding the svg aria mappings (#133)
  Closes #112: Implement ARIA role mappings for SVG (#129)
@kasperisager
Copy link
Contributor Author

Reopening as support will need to be reintroduced following #165.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants