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

Don't apply positioning directly to UI elements #408

Open
peterblazejewicz opened this issue Apr 13, 2015 · 1 comment
Open

Don't apply positioning directly to UI elements #408

peterblazejewicz opened this issue Apr 13, 2015 · 1 comment

Comments

@peterblazejewicz
Copy link
Member

@jdaudier via Gitter:
We use critical and it simply takes some declaration that it thinks are critical for rendering path out of current CSS, moves to the top of the page. The other CSS is loaded asynchronously via JavaScript.
It means that order of CSS declaration can change - as some declaration can be taken out of source CSS and moved to critical path, while the all code that creates it is still in original CSS.
That's results in sometimes unfortunate CSS being applied when declaration is out-of-the-context, in different order than intended, etc:

20150413210542

Why this button should have a top margin?
The lesson is to not position elements directly and position/layout their containers. This should fix that issue (if not, we will try to use helper classes as I wrote some time ago).

@jdaudier
Copy link
Contributor

@peterblazejewicz thanks for the explanation! I'll have to fix this ... this weekend hopefully. It's been bugging me. 😄

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

2 participants