domenic / html-as-custom-elements

HTML as Custom Elements
https://domenic.github.io/html-as-custom-elements/
Apache License 2.0
260 stars 20 forks source link

Port Blink's UA stylesheet. #12

Closed dglazkov closed 10 years ago

dglazkov commented 10 years ago

I just went and prefixed every element name with "custom-". I am sure we will need to tweak and prune this a lot. This is just a first pass.

dglazkov commented 10 years ago

@arv @domenic

dglazkov commented 10 years ago

LOL I am still learning teh hubcaps. Er.. I mean, teh githubs.

domenic commented 10 years ago

LGTM. For each element that we import, we should audit any nonstandard CSS that it uses, and either: (a) replace it with standard CSS; (b) figure out what future-CSS will be able to replace it; (c) file bugs on CSS and heavily document the fact that CSS is failing us.

I'll merge this and add a note to the file to that effect.

philipwalton commented 10 years ago

Out of curiosity, why take this approach as opposed to having elements define their own styles? Presumably the UA Stylesheet only exists today because elements could not define their own styles in the past.

dglazkov commented 10 years ago

@philipwalton good question! Since we're not building a new platform, but rather explaining the existing one, we're not trying to change things that are already in place. UA stylesheets is what HTML relies on: http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html

philipwalton commented 10 years ago

@dglazkov thanks. Makes perfect sense.