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

[csswg-drafts] [css-pseudo-4] new generated content pseudo :between/:separator

From: hfhchan via GitHub <sysbot+gh@w3.org>
Date: Sat, 28 Jul 2018 05:09:02 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-345419521-1532754540-sysbot+gh@w3.org>
hfhchan has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-pseudo-4] new generated content pseudo :between/:separator ==
When building toolbars, navbars and lists, often there needs to be separators. They are currently implemented by using :before and/or :after but this is a hacky:

(1) the separator is not semantically a part of the toolbar item or list item itself;
(2) the separator messes with hit-testing i.e. hovering the selector would either select the previous or next item which may not be preferred
(3) relying on more specific selectors to turn off the selector at the start and/or end of the list.

The effect could be more elegantly accomplished by providing a way to insert generated content between a given node's children.

Example:

ul.recycler::between {
  display: block;
  content: "";
  border-bottom: 1px solid #ccc;
  margin: 0 40px
}


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2960 using your GitHub account
Received on Saturday, 28 July 2018 05:09:07 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 28 July 2018 05:09:19 UTC