W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

[csswg-drafts] [css-Basic User Interface-4](css-ui-4) Yes, it would make sense to have selectable pseudo elements

From: Meteor0id via GitHub <sysbot+gh@w3.org>
Date: Sun, 08 Jul 2018 16:16:32 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-339237922-1531066591-sysbot+gh@w3.org>
Meteor0id has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-Basic User Interface-4](css-ui-4) Yes, it would make sense to have selectable pseudo elements ==
Reguarding discussion on paragraph 7.1: content-selection

https://www.w3.org/TR/css-ui-4/#content-selection

Issues have been raised over selectable pseudo elements. The feature has been marked with "this feature is at risk".

I would like to point out that more and more often, content-creators are pressed to add content of their page though a pseudo elements. Think about blockquotes for wich quotes are provided using ::before and ::after, and it would make no sense not to print that content or not no copy that content, since it would no longer be a proper quotation.

Bullet points or enummeration for listed items are also relevant when printing the page or when copying the page, otherwise the seperation between list items, or even their enummeration would no longer be clear.

https://jsfiddle.net/wth8jv7a/12/


```

<blockquote>
Some day he will get it working
</blockquote>
- noone ever

<p>
Lorum Ipsum went for a walk
</p>

Suspect has been found quilty on the following counts:
<ol>
<li>Has aknoledged he was indeed aware that the pie should have been taken out of the oven within 1 hour</li>
<li>Was aware the timer was not set</li>
<li>Had opertunity to walk to the kitchen and take the pie out of the oven</li>
</ol>

Suspect refutes count 3., but the judge ruled otherwise. Suspect has been found quilty of burning an aplle pie, and is hereby convicted to baking a new apple pie within 3 months after this ruling.
```


```
blockquote, q {
	quotes: "“" "”" "‘" "’";
	-webkit-user-select: text;  /* Chrome 49+ */
	-moz-user-select: text;     /* Firefox 43+ */
	-ms-user-select: text;      /* No support yet */
	user-select: text;
}
blockquote::before , q::before {
	content: open-quote;
	-webkit-user-select: text;  /* Chrome 49+ */
	-moz-user-select: text;     /* Firefox 43+ */
	-ms-user-select: text;      /* No support yet */
	user-select: text;
}
blockquote::after , q::after {
	content: close-quote;
	-webkit-user-select: text;  /* Chrome 49+ */
	-moz-user-select: text;     /* Firefox 43+ */
	-ms-user-select: text;      /* No support yet */
	user-select: text;
}

/* not a pseudo element, so is already perfectly selectable */
p:first-letter {
  font-size: 3em;
}

/* could manually add the numbers using pseudo elements, if that is waht it takes, but than again, pseudo elements are also not selectable (yet). */
ol::before, li::before {
  -webkit-user-select: text;  /* Chrome 49+ */
	-moz-user-select: text;     /* Firefox 43+ */
	-ms-user-select: text;      /* No support yet */
	user-select: text;
}
```

I hope this points out there is already a number of unmet use cases for selectable pseudo elements. This is something many have been looking forward to. Hopefully we can overcome the issues which have been raised, as moving over quotations or enumerations to the DOM would be a break with ealier agreed conventions such as enumeration of list elements in ordered lists, and quoatations, being acomplished using pseudo elements.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2894 using your GitHub account
Received on Sunday, 8 July 2018 16:16:35 UTC

This archive was generated by hypermail 2.3.1 : Sunday, 8 July 2018 16:16:35 UTC