Comments (5)
It seems an example has been added over at the CSS drafts page: https://drafts.csswg.org/selectors-4/#placeholder. It mentions:
For example, according to the semantics of [HTML] the placeholder attribute on the input element provide placeholder text, as does the first option element of a select under certain conditions. The :placeholder-shown class thus applies whenever such placeholder text is shown.
So does this mean they are just going to make :placeholder-shown
select the select
case? If so, that makes more sense than adding :placeholder-select
. We'll wait and see how this progresses.
from soupsieve.
Looking back at the level 4 spec, it appears they mean for :placeholder-shown
to also represent certain option
elements under select
as specified in the HTML spec:
If a select element has a required attribute specified, does not have a multiple attribute specified, and has a display size of 1; and if the value of the first option element in the select element's list of options (if any) is the empty string, and that option element's parent node is the select element (and not an optgroup element), then that option is the select element's placeholder label option.
This is a new requirement, and I don't think any browsers actually implement new part of :placeholder-shown
yet. So this isn't high priority, but something we should look into.
from soupsieve.
I will probably wait to see when other browsers implement this. Unfortunately, the csswg takes a looooong time to settle on things and back pedal on things, and if browsers never implement it, stuff gets dropped. It's been years and level 4 still isn't finalized. I may be slower to implement things that browsers aren't implementing moving forward.
from soupsieve.
If/when we decide to pull the trigger on this, this would essentially get us what we want: https://github.com/facelessuser/soupsieve/tree/feature/placeholder-shown-select.
from soupsieve.
This functionality seems to have been moved to :blank in the spec. Closing as it seems this will not be relevant to :placeholder-shown.
from soupsieve.
Related Issues (20)
- CDATA handling in HTML changed in lxml parser with libxml2 2.9.12 HOT 21
- Interesting psuedo class to keep an eye on `:in()` HOT 8
- Rework internal structure of "relations" HOT 1
- circular dependency /bs4 HOT 15
- Attribute selectors vs \n in values HOT 5
- Change in `:has()` CSS Level 4 spec - document our difference or update? HOT 1
- hatch? HOT 5
- Using Hatch in Python 3.6 is technically not allowed HOT 7
- setup.py is mentioned in readme but there is no setup.py HOT 2
- Invalid syntax error on python3.4 HOT 5
- Tracking `:scope` issue related to relative selector lists (`:has()`) HOT 1
- pyproject.toml: validation error since setuptools 61.2.0 HOT 8
- PermissionError: [Errno 13] Permission denied HOT 4
- missing dependency on `bs4` HOT 7
- LXML does not currently generate wheels for Python 3.11 on Windows
- `:has()` is no longer forgiving HOT 1
- malformed attribute selector HOT 7
- The new type hints cause pytest to hang after test session HOT 4
- Attribute Selector Case Sensitivity: Whitespace HOT 1
- Potentially rework CSS parsing
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 soupsieve.