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

Cesium does not play well with Normalize.css? #2479

Closed
mramato opened this issue Feb 10, 2015 · 1 comment
Closed

Cesium does not play well with Normalize.css? #2479

mramato opened this issue Feb 10, 2015 · 1 comment
Assignees

Comments

@mramato
Copy link
Contributor

mramato commented Feb 10, 2015

@emackey, hopefully this is an easy fix.

I'm using Cesium is a bootstrap-based page and the InfoBox title looks like the below:

image

Bootstrap uses normalize.css under the hood. Order or css inclusion seems to have no effect. Given the enormous popularity of these libraries, we should probably look into this sooner rather than later.

@emackey emackey self-assigned this Feb 10, 2015
@emackey
Copy link
Contributor

emackey commented Feb 10, 2015

Bootstrap thinks it's cool to switch the default box-sizing computations for all elements.

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

This makes it "easier for everyone to understand" or something like that, but also makes it different from the old default behavior (which is box-sizing: content-box;).

The fix is, we should explicitly specify a box-sizing model on any Cesium widgets that depend on width, or height, or a combination of top / bottom, or combo left / right. This will take some searching through the CSS to make sure we got all the places, but it's the only way to be tolerant of different global default box-sizing settings.

In the specific example above, the fix is: .cesium-infoBox-title { box-sizing: content-box; }

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

2 participants