-
Notifications
You must be signed in to change notification settings - Fork 707
[css-text-decor-4] Add 'inset' keyword to text-shadow #6074
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
But currently, text shadows "never overlay the text itself". Would it be different for inset text shadows? Or would they only be visible if the text is not fully opaque? |
Yeah, inset text shadows would have to be painted over the text for sure. |
For something bold it would make it easier to sculpt 3D looking glyphs. There are ways to sort of get that effect now... I'd like to see the "offset" property that box-shadow has added to text-shadow, as that would allow for some fun multi outline effects. There are accessibility concerns here though and the potential for mis use that damages readability... |
The x and y offset values are actually the mandatory part of Also note, that Text Decoration 4 already added a spread radius. So the only difference to
The readability issues actually already exist right now, depending on how you define the shadow(s). (Take the second example from above.) The Sebastian |
For what it's worth, here's a related feature request for Gecko including a sample image: https://bugzilla.mozilla.org/show_bug.cgi?id=577672 Sebastian |
@fantasai Since that's a straight forward addition with known use cases, could this be added to the agenda to get a decision? Once it's decided to add it, I can write up some spec. text for it. Sebastian |
While we're at it, can we add spread? That's far more frequently needed than |
As mentioned in a previous comment, the spread radius is already part of Text Decoration 4. Sebastian |
If you're interested in following the implementation issues for the spread radius, here they are: WebKit: https://wkb.ug/76997 Sebastian |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> Topic: Text Shadow Inset<TabAtkins> They *do* have different behavior, so the slightly different syntax matches that. <fantasai> github: https://github.com//issues/6074 <fantasai> fantasai: Proposal is to add the 'inset' keyword and allow inset shadows on text <fantasai> smfr: For box-shadow, it interacts with border and is inside the border <fantasai> smfr: unsure if we have spec text on interaction with stroke <fantasai> smfr: Still OK to add it, and figure out later on <fantasai> fantasai: So should have text shadows start at the edge of the stroke (both outset and inset) <fantasai> smfr: Makes the most sense <fantasai> fantasai: Outset shadows would start at outer edge of stroke, inset shadows at inner edge of stroke <fantasai> astearns: Any objections? <fantasai> RESOLVED: Add inset to text-shadow <fantasai> RESOLVED: Text shadows start at outer (for outset) or inner (for inset) edge of stroke |
Edited in. @smfr, would you mind reviewing the text to make sure that the interaction with stroke and the stacking order constraints are adequately explained? |
Filed follow-up issues in response to smfr's comments in 13442dd : |
The
box-shadow
property takes an optionalinset
keyword allowing the shadow to be displayed inside the box, allowing to create "pushed in" effects.The same should be possible for text shadows. Especially for big bold texts like in headlines this would be valuable to give them a special touch.
Therefore, I suggest to add the optional
inset
keyword to thetext-shadow
property. Effectively, this makes its syntax the same as the one forbox-shadow
.Sebastian
The text was updated successfully, but these errors were encountered: