Skip to content
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

examples of selector= attr of <rendition> wrong? #1766

Closed
sydb opened this issue Apr 12, 2018 · 5 comments
Closed

examples of selector= attr of <rendition> wrong? #1766

sydb opened this issue Apr 12, 2018 · 5 comments
Assignees

Comments

@sydb
Copy link
Member

sydb commented Apr 12, 2018

The value of @selector is “a selector or series of selectors”. If @scheme is (or is assumed to be) "CSS", how are the distinct selectors of a series separated from one another? Some examples show what look like a series of whitespace-separated element types, but in CSS separating two element types by a space means “descendant of”. E.g.:

<rendition selector="emph hi name title">font-style: italic;</rendition>

In CSS this means something akin to the XPath emph//hi//name//title. I bet the example wants to say “<emph> or <hi> or <name> or <title>”. Thus I do not think we can use whitespace as a way to separate a series of selectors. But in CSS this would be indicated with “emph, hi, name, title”, no?
There are 5 cases of @selector that use (only) whitespace to separate element types. It is not clear to me just glancing at them which ones mean “descendant” and which mean “or” (and thus should be changed to comma).

(BTW, thanks to @amclark42 for helping w/ this.)

@martindholmes
Copy link
Contributor

martindholmes commented Apr 13, 2018

This would be helpful:

Multiple selectors: Again, these are not separate selectors; the idea is that you can put multiple selectors on the same CSS rule, separated by commas, to apply a single set of declarations to all the elements selected by those selectors.

https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Selectors

The spec calls them "groups of selectors":

https://www.w3.org/TR/2018/CR-selectors-3-20180130/#grouping

@sydb
Copy link
Member Author

sydb commented Apr 20, 2018

Here are the 5 cases.

From <tagUsage> tagdoc, should use a comma:

<rendition xml:id="IT" scheme="css" selector="emph hi">font-style: italic;</rendition>

Next 2 are from HD, should remain space:

<rendition scheme="css" selector="front p">  
    font-size: 110%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
  </rendition>
<rendition scheme="css" selector="body p">  
    font-size: 100%;
    margin-top: 0;
    margin-bottom: 0;
  </rendition>

From <tagsDecl> tagdoc, should use commas:

<rendition xml:id="rend-it" scheme="css" selector="emph hi name title">font-style: italic;</rendition>

From ST, should use a comma:

<rendition xml:id="it" scheme="css" selector="foreign hi"> font-style: italic; </rendition>

@peterstadler
Copy link
Member

subgroup agrees that this is a no-brainer and thanks @sydb for his exemplary documentation

@martinascholger martinascholger added this to the Guidelines 3.6.0 milestone Jun 19, 2019
@martinascholger
Copy link
Member

For documentation purposes: it was foreign, hi in <tagUsage> and emph, hi in ST

@martinascholger
Copy link
Member

Close 4fa73f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants