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 parser parses sequence of custom idents for @font-feature-values #1743

Closed
Tracked by #268
unvalley opened this issue Feb 3, 2024 · 8 comments
Closed
Tracked by #268
Assignees
Labels
A-Parser Area: parser L-CSS Language: CSS

Comments

@unvalley
Copy link
Member

unvalley commented Feb 3, 2024

Description

We need to extend the current implementation to support a sequence of custom idents.
For example:

@font-feature-values Otaru Kisa Times New Roman {
  @annotation { circled: 1; black-boxed: 3; }
}

@font-feature-values Otaru Kisa {
    @annotation { circled: 1; black-boxed: 3; }
}

@font-feature-values Taisho Gothic {
    @annotation { boxed: 1; circled: 4; }
}

@font-feature-values Taisho Gothic, Bar {
    @annotation { boxed: 1; circled: 4; }
}

We have in our css ungram:

AnyCssFontFamilyName =
	CssCustomIdentifier
	| CssString

We need to implement a list of CssCustomIdentifier to support the syntax.

@unvalley unvalley added A-Parser Area: parser L-CSS Language: CSS labels Feb 3, 2024
@denbezrukov denbezrukov mentioned this issue Feb 16, 2024
31 tasks
@denbezrukov denbezrukov changed the title 📎 CSS parser parses spaced font names as single identifiers for @font-feature-values 📎 CSS parser parses sequence of custom idents for @font-feature-values Feb 16, 2024
@denbezrukov
Copy link
Contributor

@kubijo could you please make a comment here?

@kubijo
Copy link

kubijo commented Feb 16, 2024

I could, but I don't think I'm the one you wanted to mention

@denbezrukov
Copy link
Contributor

@kubijo I'm sorry))) I've copied a wrong tag))

@bjoroen
Copy link
Contributor

bjoroen commented Feb 16, 2024

I can make a comment here 😁

@bjoroen
Copy link
Contributor

bjoroen commented Feb 17, 2024

@denbezrukov @unvalley I'm struggling a little bit figuring out what the correct way of implementing the syntax would be.

Something like this?

CssFontFeatureValuesAtRule =
	'font-feature-values'
	items: CssCustomIdentifierList
	block: AnyCssFontFeatureValuesBlock

CssCustomIdentifierList = CssCustomIdentifier*

Or would it be something like

CssFontFeatureValuesAtRule =
	'font-feature-values'
	items: AnyCssFontFamilyName
	block: AnyCssFontFeatureValuesBlock


AnyCssFontFamilyName =
	CssCustomIdentifierList
	| CssCustomIdentifier
	| CssString

Or am I completely off? Any nudge in the correct direction would be greatly appreciated.

@denbezrukov
Copy link
Contributor

I believe we need to go with:

CssFontFeatureValuesAtRule =
	'font-feature-values'
	name: AnyCssFontFamilyName
	block: AnyCssFontFeatureValuesBlock


AnyCssFontFamilyName =
	CssCustomIdentifierList
	| CssString

@bjoroen
Copy link
Contributor

bjoroen commented Feb 17, 2024

Thanks for the feedback, that helps a lot.

@bjoroen
Copy link
Contributor

bjoroen commented Mar 23, 2024

@denbezrukov

I have tried to fix this issue, but have not been able to get to a working solution.

If anyone wants to take this issue it would be ok with me, I don't think Ill manage to find a working solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Parser Area: parser L-CSS Language: CSS
Projects
None yet
Development

No branches or pull requests

4 participants