Comments (1)
I've also investigated this issue, and here is my opinion:
- Should
getComputedStyle(x, "::search-text")
return the:current
styles or the:not(:current)
styles? We propose:not(:current)
, and specifying this behaviour for ::search-text in css-pseudo #getComputedStyle.
I agree with this because we need to stick to the current behavior of getComputedStyle() for highlight pseudo-element.
It returns styles as if that highlight is active and all other highlights are inactive.
- Given that
getComputedStyle(x)
returns the:hover
styles when x is being hovered, shouldgetComputedStyle(x, "::first-line")
return the::first-line:hover
styles when the first line is being hovered? My current belief is that it should, and that in general, getComputedStyle should take pseudo-classes of the given pseudoElt into account. Note that ::first-line:hover rules are not yet supported by major impls (demo).
I agree with this.
In addition, I found a request to support this feature from WICG.
- Can we give authors a way to get the
::search-text:current
styles? My current belief is that we should change pseudoElt from<pseudo-element-selector>
to<pseudo-compound-selector>
, but I’m not yet sure how we would update the algorithm in a way that satisfies both my beliefs in question 2 and question 3.- Can we give authors a way to get the
::before::marker
styles? My current belief is that we should change pseudoElt to<pseudo-element-selector>+
or<pseudo-compound-selector>+
, depending on the outcome of question 3.
I also think that changing pseudoElt from <pseudo-element-selector>
to <pseudo-compound-selector>
for getComputedStyle(elt, pseudoElt)
is reasonable way to approach.
I also think :target::target-text
may be similar to ::search-text:current
in terms of how it works with getComputedStyle()
.
It seems getComputedStyle(x, ":target::target-text")
returns null
in this case now.
Here is the demo related to this.
from csswg-drafts.
Related Issues (20)
- [web-animations] how to make animate() method work with CSSKeyframesRule object? HOT 4
- [css-color-5]: Relative Colors doesn’t work with `calc(l + 10%)` HOT 1
- [css-color-5]: light-dark() doesn’t work with Relative Colors HOT 2
- Two "variants" of `color-mix()` ?? HOT 4
- [css-animations-2][web-animations-2] (proposal) Add pointer driven animations
- [css-values-5] Should `interpolate-size` be a new value to animation/transition-behavior? HOT 8
- CSS Color; light-dark() should be applicable on more properties. HOT 12
- [css-color-4] Evaluate static gamut mapping algorithms for oklab/oklch spaces HOT 4
- [css-easing-2] Linear easing function requires at least two points? HOT 3
- [scroll-animations-1] Consider adding a timeline range that takes ink overflow into account
- [scroll-animations-1][css-animations-1] A non-animated "Is in viewport" HOT 4
- [css-ui-4] Add `outline-offset-(inline|block)[-(start|end)]`
- [css-view-transitions-2] Capture modes HOT 1
- [css-view-transitions-1] Consider a wider margin from viewport than 0 for offscreen elements
- [css-tables] block size distribution to table sections not interoperable
- [css-tables] Distribution of block size to table sections not interoperable. HOT 4
- [css-scrollbars] Scrollbar Hover/Interaction Colors HOT 3
- [css-values-5] Boolean values in CSS custom properties HOT 2
- [css-values-5] Proposal for a new `matches()` CSS Function HOT 1
- [css-backgrounds-3] Does `background-attachment: fixed` work with `background-clip: text`? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csswg-drafts.