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

[css-functions] Shouldn't the index of functions include url()? #1014

Closed
praveenpuglia opened this issue Feb 9, 2017 · 5 comments
Closed

Comments

@praveenpuglia
Copy link
Contributor

I am looking at the CSS Indexes, Functions section and I realized the url() function isn't mentioned there. Is this deliberate or am I missing something?

Looking at this example it feels like it should be part of it.

@plinss
Copy link
Member

plinss commented Feb 9, 2017

It should be present, it's missing because there is no <dfn> markup for it in our specs so Shepherd can't find a link anchor, and Bikeshed doesn't see it. Needs a spec update for better markup.

css-values defines the <url> type, but apparently not the url() function.

@praveenpuglia
Copy link
Contributor Author

So is there something I can do on my end and send PR somewhere to get this fixed?

@svgeesus
Copy link
Contributor

svgeesus commented Feb 9, 2017

Sure! Sending a PR that adds the correct markup to declare that function would be super helpful. The editors could also do it, but they are busy with a lot of other specs as well so a PR would get the change in faster.

@praveenpuglia
Copy link
Contributor Author

So all we need is <dfn>url()</dfn> snippet like this for url()? If so, we might also need a paragraph of text which gives a brief intro to url() like it does for attr() or toggle(). Example -

The <dfn>toggle()</dfn> expression allows descendant elements
to cycle over a list of values instead of inheriting the same value.

@plinss
Copy link
Member

plinss commented Feb 10, 2017

Basically, yes, but the <dfn> also needs an id or to be inside something with an id (like a heading) so that it serves as an anchor for other specs to link to. For specs using bikeshed (css-values-3/4), the id will be automatically generated by bikeshed, however CSS2.2 uses a different pre-processor, I'm not sure if it adds ids to <dfn>s or not.

For completeness, both Bikeshed and Shepherd also need type information for the <dfn> e.g. <dfn data-dfn-type='function'> but both will use heuristics and should determine the type automatically based on the (). See the Bikeshed docs for more detail on that.

CSS2.2 should definitely get a <dfn>url()</dfn>, but as you say, might require prose changes to make sense in context. It's debatable whether a url function definition should be added to css-values or not, please consult the editors on that one, cc @tabatkins @fantasai

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

4 participants