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

Consolidate styles and scripts in Bikeshed-generated standards #68

Open
annevk opened this issue Jan 3, 2018 · 17 comments
Open

Consolidate styles and scripts in Bikeshed-generated standards #68

annevk opened this issue Jan 3, 2018 · 17 comments

Comments

@annevk
Copy link
Member

annevk commented Jan 3, 2018

Currently there's inline style for syntax highlighting and dfn boxes. And also inline script for service workers and dfn boxes. It seems we should consolidate these somewhat as it's not exactly best practice.

Follow-up to #23.

@annevk
Copy link
Member Author

annevk commented Jan 3, 2018

cc @tabatkins

@tabatkins
Copy link

Bikeshed inlines those styles so that random specs don't magically gain a dependency on some other org's domain.

If you want do do it yourself, tho, that's easy - tell Bikeshed to omit the styles with Boilerplate: style-foo no, (the "style-foo" or "script-foo" key is automatically shown in the first line of the style/script) then put your own styles into your boilerplate.

@annevk
Copy link
Member Author

annevk commented Jan 7, 2018

Could you explain what you mean by the first sentence? (Also, thanks for the advice, that'll help a ton.)

@tabatkins
Copy link

Bikeshed's syntax highlighting, for example, depends on some CSS to work right. If that CSS was hosted somewhere, anywhere, it would make all Bikeshed documents using syntax highlighting depend on that hosting domain. This isn't great. Instead, Bikeshed inlines the styles so the spec is fully functional all by itself. The only external dependencies a Bikeshed document can have are those imposed explicitly by the group's boilerplate.

@annevk
Copy link
Member Author

annevk commented Mar 18, 2020

@sideshowbarker it seems the main missing thing here is MDN annotations. Are we already tracking that somewhere?

@sideshowbarker
Copy link
Contributor

it seems the main missing thing here is MDN annotations. Are we already tracking that somewhere?

Well the MDN-annotations patch for Bikeshed hasn’t landed yet—

speced/bikeshed#1564

But as far as I understand, what we’ll end up doing is what’s discussed at speced/bikeshed#1564 (comment)

@annevk
Copy link
Member Author

annevk commented Mar 18, 2020

Okay, so it should be all good in the end.

dom.spec.whatwg.org already has MDN annotations as far as I can tell which is why I was asking.

@sideshowbarker
Copy link
Contributor

dom.spec.whatwg.org already has MDN annotations as far as I can tell which is why I was asking.

Just the review draft, because I built it with Bikeshed from the speced/bikeshed#1564 branch

@tabatkins
Copy link

tabatkins commented Mar 19, 2020

whoops, sorry i dropped the ball there. I'll review and merge the pr tomorrow.

@annevk
Copy link
Member Author

annevk commented Mar 19, 2020

Oh wait, I confused MDN and dfn. My bad. The definitions panel is what is causing inline styles and scripts.

@sideshowbarker
Copy link
Contributor

Oh wait, I confused MDN and dfn. My bad. The definitions panel is what is causing inline styles and scripts.

OK yeah I think there’s no reason we can’t move the dfn stuff to the external stylesheet and script

@annevk
Copy link
Member Author

annevk commented May 8, 2020

I also noticed that whatwg/whatwg.org@4a772bd#diff-1ecbbc7389dd3ea567573f6e14a5fc8c has features that bikeshed's script does not have, such as no-backref. (I was thinking of generalizing/obsoleting that by excluding all backreferences to notes (or at least indicate them differently).)

I have continued to markup things as no-backref, but apparently that stopped working.

@tabatkins
Copy link

If you'd like any specific feature added to Bikeshed's functionality, just file an issue. ^_^

@annevk
Copy link
Member Author

annevk commented May 15, 2020

Per IRC discussion Bikeshed has the support we need. We'd have to add omit script-dfn-panel and omit style-dfn-panel to our boilerplate.

Remaining things:

  1. Should we put the style sheets in standard.css or some kind of new file that's not included by HTML?
  2. Scripts will have to remain separate. I guess we'd restore resources.whatwg.org/dfn.js with Bikeshed's script.
  3. Is anyone up for refactoring HTML's dfn usage to allow for more reuse of styles/script from Bikeshed? (A lot of it is for multipage and that cannot be reused.)
  4. HTML's dfn usage also has some bugs. E.g., the #workers header uses a pointer cursor but no panel will spawn.
  5. Should we use an external script for installing the service worker?

@domenic
Copy link
Member

domenic commented May 15, 2020

Should we put the style sheets in standard.css or some kind of new file that's not included by HTML?

standard.css

Scripts will have to remain separate. I guess we'd restore resources.whatwg.org/dfn.js with Bikeshed's script.

I don't understand this question

Is anyone up for refactoring HTML's dfn usage to allow for more reuse of styles/script from Bikeshed? (A lot of it is for multipage and that cannot be reused.)

I think we should be able to align the styles without much trouble at all. It seems like just changing some class names, plus figuring out if there's any of the HTML-specific style rules we want to port to Bikeshed specs too.

HTML's dfn usage also has some bugs. E.g., the #workers header uses a pointer cursor but no panel will spawn.

Seems like a script problem?

Should we use an external script for installing the service worker?

I don't understand this question.

@annevk
Copy link
Member Author

annevk commented May 16, 2020

@domenic Bikeshed currently inserts an inline script. I'd like us to not do that and host our own script. I was also wondering if the service worker script should be external as well as per OP.

@domenic
Copy link
Member

domenic commented May 16, 2020

The service worker script is already external? Or do you mean the one-liner that installs the service worker?

@sideshowbarker sideshowbarker removed their assignment Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants