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

How to control rendering style #25

Open
chaals opened this issue May 30, 2015 · 3 comments
Open

How to control rendering style #25

chaals opened this issue May 30, 2015 · 3 comments

Comments

@chaals
Copy link
Contributor

chaals commented May 30, 2015

How do we use CSS to set the rendering style? Should there be an attribute, like preferredForm? …

@bkardell
Copy link
Owner

bkardell commented Jun 1, 2015

This is probably the single most difficult question because it definitely should be governed by CSS, but we probably don't want this proposal (or prollyfill implementations) dependent on another, or more complex one which isn't a thing yet. The obvious choice to avoid this seems to be an attribute, but CSS can't control attribute values and it never will be able to because that creates circular logic. Currently the prototype uses (and links to) a minimal prototype/proposal for 'preferred display' but that actually does have the stuff expressed in (custom) CSS controlling an attribute (because there's really no other way of having the actual CSS style it otherwise - there's no way to say 'accordion titles look like this' without a selector to base it on).

The most obvious answer to me seems that if you can spec it in such a way that you dont say 'this attribute definitely does style it a certain way' but rather can play in the overall scheme (ie, be trumped by CSS and then still used to style) - but I'm just not sure how to propose something that doesn't paint you into potential corners.

@LJWatson
Copy link
Collaborator

LJWatson commented Jun 1, 2015

On the assumption there will need to be (at the least) a basic browser styling for a panel/panelset, the trick will be finding something appropriate. That may even be outside of the scope for this extension – to some extent it’s a UA implementation choice.

The critical thing will be that authors can completely override the browser styling. We don’t want a repeat of the current restrictions on styling interactive elements!

@chaals
Copy link
Contributor Author

chaals commented Jun 1, 2015

To make this work we need browser implementation anyway. Which is good, because any CSS we want has to be implemented, or it disappears from browser engines.

Assuming we have defined some CSS property, you can put that in a style attribute, and manipulate it with javascript.

What is important is that it is possible to style all the things, in a way that allows for override.

So we need to define something like a box model, and the pieces in it - which is what the multi-coloured image in the spec does, right?

And then we need to figure out, especially for deck mode which is basically full-screen, what happens so the user doesn't get phished…

…which we can probably do in part by piggy-backing on fullscreen.

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

No branches or pull requests

3 participants