-
Notifications
You must be signed in to change notification settings - Fork 711
[css-logical-1] spec should introduce propdef table notation for logical properties #2822
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
Comments
Also, I think there's a decent case to be made that the relevant propdef table entry should say both:
|
This is already happening, e.g. https://drafts.csswg.org/css-overflow-3/#logical |
For properties, the mapping is always using the writing mode of the element itself. So that shouldn't need to go into the propdef table. |
If we do this, rather than adding a statement like @Loirooriol proposes in #3033 then I think it would be something like:
where the identifier would typically be the most specific common shorthand of all the properties. ( If we go with a statement, I would go with, e.g.:
so we don't have to list everything out. Easier to read, less likely to forget one. |
Works for me. But this should also appear in the associated physical properties, not just the logical ones. Because a logical property group has both.
According to https://drafts.csswg.org/css-backgrounds/#border-style, |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [css-logical-1] spec should introduce propdef table notation for logical properties<dael> github: https://github.com//issues/2822 <dael> fantasai: Need to ID properties that belong to logical prop group <dael> fantasai: ONe way is shorthand in prose but suggested we add a new link to propdef tables for proeprties part of logical property mapping group with same ID <iank_> An example of only looking at the "set" of properties: https://www.software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cdiv%20style%3D%22display%3A%20-webkit-box%3B%22%3E%0A%20%20%3Cdiv%20style%3D%22-webkit-box-ordinal-group%3A%202%3B%22%3EA%3C%2Fdiv%3E%0A%20%20%3Cdiv%20style%3D%22order%3A%203%3B%22%3EB%3C%2Fdiv%3E%0A%3C%2Fdiv%3E <dael> fantasai: If we do this I think it should be optional in propdef so we don't have a bunch of empty fields <dael> astearns: Do you agree with oriol about in associated phsyical properties? <dael> fantasai: Of course. They're part of the logical property group <dael> astearns: How many specs, how many properties? <dael> fantasai: B&B, positioning, scroll-snap, and box are the only one effected, I think <dael> fantasai: border, margin, padding, scroll snap margin and padding, inset properties <dael> fantasai: Most specs not effected which is why I think when making propdef don't include unless needed <oriol> overflow too <dael> astearns: Opinions? <dael> astearns: oriol mentioned overflow <dael> fantasai: Yeah <fantasai> s/effected/affected/ <dael> astearns: Prop: Optional line in propdef table for logical property groups <dael> fantasai: Yeah. May fiddle with name. <dael> heycam: I also see groups for min size and max size? <dael> fantasai: Yeah, sizing also affected <dael> astearns: Objections to adding a line? <dael> RESOLVED: Add an optional line in propdef table for logical property groups |
Can you please tell me what would be the group identifier for And would you accept a PR to add the field in the appropriate property definition tables (do you have some convention/preference for the definition field order, maybe between |
I don't think it matters. But Blink, WebKit and Gecko use
I don't think anybody is planning to do it soon. Better confirm the details with editors of the affected specs. |
I was hoping to generate a representation of logical property groups/mappings with types similar to the following:
I do not need an explicit EDIT: actually, I need an explicit mapping identifier for each property but I think I do not want to make a selfish request but please let me know if you think that some consistency should be applied. I would be happy to help. |
I'm not sure I understand what you're asking about. |
The procedures set a CSS declaration and serialize a CSS declaration block require to check whether a longhand 1. belongs to the same logical property group and 2. has a different mapping logic, than another longhand. A For example: const logicalPropertyGroups = [
// ...
'size': [
['block-size', 'inline-size'],
['height', 'width'],
],
// ...
] In specs, some longhands of the same logical property group and with the same mapping logic, are defined in the same definition table, which appears below a section title, eg. Physical Longhands for
But for some other longhands, like Solutions are:
|
Ah, I see what you mean. Apologies, I wasn't fully up-to-date on the algorithms. |
Now fixed in #7950. Now, at least, I can automatically watch for new logical properties and manually add them to the corresponding mapping logic subset. |
The section on Box Model Properties introduces a large number of new properties which are very different from all other CSS properties in that they don't have independent computed values, because their computed values mirror another CSS property. While this is expressed in the prose, it seems like it should be expressed in the propdef table, since other specifications will (hopefully) be introducing similar properties, and it would be good to have a consistent notation for introducing them rather than doing so with prose that may come over time to have normative differences.
I got here from w3ctag/design-reviews#286.
The text was updated successfully, but these errors were encountered: