-
Notifications
You must be signed in to change notification settings - Fork 683
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-inline][css-text-4] Allow padding to be applied at line start and end #1973
Comments
Not sure if this fits better into css-inline or css-text, but it's definitely a layout issue, not a backgrounds one--the backgrounds need more space to draw into. |
The Working Group just discussed
The full IRC log of that discussion<fantasai> Topic: line-start/end padding<fantasai> github: https://github.com//issues/1973 <fantasai> leaverou, they're the first links in each issue <dael> fantasai: This one is an issue where they want padding at start and end of line and applied to inner most element at that point. <dael> fantasai: If ou have a span broken across 2 lines and at the end line padding is inserted into the span. With CSS you can wrap all the text but it gives you the last result. THis is effectively the opposite of letter spacing. This is outside the letter on the start and end. <dael> fantasai: SHould be easy to impl, but we need syntax for it. I wanted to do this because it's easy to understand. <dael> TabAtkins: Am I imagining a difference in the black line from hello and my? <dael> fantasai: I think that's not intentional. <dael> TabAtkins: Okay. <dael> myles: If you have 2 nested do you use innermost <dael> TabAtkins: It would be like letter spacing where one wins on the letter that ends the line. <dael> florian: this inherits? <dael> fantasai: I think that's simple. <dael> TabAtkins: Has to. Letter spacing but for the space where we don't put letters. <dael> myles: Recommendation is at the tie you do the line breaking you do this for the end of the line? Not sure how it works for beginning. <dael> fantasai: You look at first character on your line and before you figure out how big the character is and like that you have to go forward a bit. <fantasai> You take the line-padding value of that character <dael> astearns: They use line padding as the avenue to control this. <dael> fantasai: We could introduce a line-padding property that has a longhand. <dael> florian: and if you're intrupted by a float? <dael> fantasai: It's between you and the float. <dael> dbaron: Are there interesting things with bidi? <dael> fantasai: no. <dael> dbaron: pre or post reordering <dael> fantasai: post <dael> myles: there's always a character at the end of the line. Whatever element that's part of is what you consult. <dael> florian: If you're post-reorder you might get a different character at the end. <dael> fantasai: Alternative is have this on the block. Whatever block makes the line box gets the value <dael> Rossen: Similar to the box direction. <dael> TabAtkins: Then you jsut shoot the line box. <dael> TabAtkins: Possiblity is make it not inherit. <TabAtkins> s/shoot/shrink/ <dael> fantasai: YOu want inherit because you mana anon boxes. BUt you can put it on the block container at which point it's applied. <TabAtkins> s/mana/make/ <dael> florian: I think possibility of different padding based on bidi is not useful and complicates things quite a bit. <dael> TabAtkins: This does seem better. NO drilling down and no bidi. I like this. <dael> fantasai: The property is inherited by applies to block containers. When you do your layout you look at line padding property of the line box you're in which comes from the block container. <dael> fantasai: I guess we're rsolved on that approach of having the property <dael> astearns: Text level 4 again? <dael> fantasai: Yeah. Other option is css Inline. Not sure where it fits better. <dael> astearns: Prop: Add a line-padding property as described in minutes to text level 4. <dael> RESOLVED: Add a line-padding property as described in minutes to text level 4. |
Edited into the draft at https://drafts.csswg.org/css-text-4/#line-padding-property Just need to also do #1975 and then should be ready to publish a new WD. ^_^ |
Thanks for that @fantasai - looks really good. I have one small concern that the example description could be misleading and made a proposal in a comment on the commit at 7fd0270#r30504756 but am not sure the best way to make that change. There doesn't seem to be a pull request associated with this issue and I'm still getting to grips with the working style of CSS WG, so apologies for that. |
@nigelmegitt Great! Checked in your suggestion. Thanks so much for the review!!
Usually the editor(s) will push directly to the ED if they're reasonably certain of the change. We'll use PRs if there seems to be a need for review before it goes online, or if proposing edits to someone else's spec. |
Per the 20171109 joint TTWG/CSS meeting
As illustrated at linePadding.pdf and specified at https://tech.ebu.ch/docs/tech/tech3380.pdf, a common captioning style requires the background of a line area to be extended at line start and line end. This styling capability is not currently supported by CSS.
See for example regions 3 and 4 at https://codepen.io/palemieux/pen/vyzbqW . Region 1 and 2 illustrate a region with and without line padding applied.
This capability mirrors the
ebutts:linePadding
styling attribute at https://www.w3.org/TR/ttml-imsc1.0.1/#linepadding , which is demonstrated in the following sample document, which can be rendered at http://sandflow.com/imsc1proc/index.html .The text was updated successfully, but these errors were encountered: