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

Explicitly set box-sizing to avoid visual bugs when using bootstrap. #2505

Merged
merged 4 commits into from
Feb 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Apps/Sandcastle/CesiumSandcastle.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ html, body {
}

#toolbar, #galleryContainer {
-ms-user-select: none;
-moz-user-select: -moz-none; /* allows for re-enabling on sub-elements like the search box */
-webkit-user-select: none;
user-select: none;
}

#search {
-ms-user-select: text;
-moz-user-select: text;
-webkit-user-select: text;
user-select: text;
}

.cesiumTitle {
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Change Log
* Added `pack` and `unpack` functions to `Matrix2` and `Matrix3`.
* Added camera-terrain collision detection/response when the camera reference frame is set.
* Added `ScreenSpaceCameraController.enableCollisionDetection` to enable/disable camera collision detection with terrain.
* Fixed some styling issues with `InfoBox` and `BaseLayerPicker` caused by using Bootstrap with Cesium. [#2487](https://github.com/AnalyticalGraphicsInc/cesium/issues/2479)

### 1.6 - 2015-02-02

Expand Down
4 changes: 3 additions & 1 deletion Source/Widgets/Animation/Animation.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
cursor: pointer;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}

Expand Down Expand Up @@ -90,6 +91,7 @@
.cesium-animation-buttonDisabled {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}

Expand Down Expand Up @@ -171,4 +173,4 @@
.cesium-animation-knobInner {
/* Widget will add: fill: url(#animation_knobInner); */
cursor: pointer;
}
}
7 changes: 6 additions & 1 deletion Source/Widgets/BaseLayerPicker/BaseLayerPicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
.cesium-baseLayerPicker-dropDown {
display: block;
position: absolute;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
top: auto;
right: 0;
width: 320px; /* Includes space needed for scrollbar */
width: 320px; /* Includes space needed for scrollbar */
max-height: 500px;
margin-top: 5px;
background-color: rgba(38, 38, 38, 0.75);
Expand All @@ -22,6 +25,7 @@
border-radius: 10px;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transform: translate(0, -20%);
-moz-transform: translate(0, -20%);
Expand Down Expand Up @@ -98,6 +102,7 @@
padding: 0;
cursor: pointer;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

Expand Down
8 changes: 5 additions & 3 deletions Source/Widgets/CesiumInspector/CesiumInspector.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
padding: 4px 12px;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: hidden;
}
Expand All @@ -25,7 +26,7 @@
padding-bottom: 3px;
}

.cesium-cesiumInspector input:enabled, .cesium-cesiumInspector-button{
.cesium-cesiumInspector input:enabled, .cesium-cesiumInspector-button {
cursor: pointer;
}

Expand Down Expand Up @@ -71,16 +72,17 @@
cursor: pointer;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
margin: 0 auto;
}

.cesium-cesiumInspector-pickButton:focus {
outline: none;
outline: none;
}

.cesium-cesiumInspector-pickButton:active, .cesium-cesiumInspector-pickButtonHighlight {
color: #000; /* For text buttons */
color: #000; /* For text buttons */
background: #adf;
border-color: #fff;
box-shadow: 0 0 8px #fff;
Expand Down
2 changes: 1 addition & 1 deletion Source/Widgets/CesiumWidget/CesiumWidget.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
position: relative;
}

.cesium-widget,.cesium-widget canvas {
.cesium-widget, .cesium-widget canvas {
width: 100%;
height: 100%;
touch-action: none;
Expand Down
1 change: 1 addition & 0 deletions Source/Widgets/Geocoder/Geocoder.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
padding: 0 32px 0 0;
border-radius: 0;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: width ease-in-out 0.25s, background-color 0.2s ease-in-out;
-moz-transition: width ease-in-out 0.25s, background-color 0.2s ease-in-out;
Expand Down
5 changes: 4 additions & 1 deletion Source/Widgets/InfoBox/InfoBox.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}

.cesium-infoBox-bodyless .cesium-infoBox-title {
Expand Down Expand Up @@ -73,7 +76,7 @@ button.cesium-infoBox-close {
border: none;
border-radius: 2px;
font-weight: bold;
font-size:16px;
font-size: 16px;
padding: 0 5px;
margin: 0;
color: #edffff;
Expand Down
12 changes: 1 addition & 11 deletions Source/Widgets/NavigationHelpButton/NavigationHelpButton.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,23 @@
border-radius: 10px;
-webkit-transform: scale(0.01);
-moz-transform: scale(0.01);
-ms-transform: scale(0.01);
-o-transform: scale(0.01);
transform: scale(0.01);
-webkit-transform-origin: 234px -10px;
-moz-transform-origin: 234px -10px;
-ms-transform-origin: 234px -10px;
-o-transform-origin: 234px -10px;
transform-origin: 234px -10px;
-webkit-transition: visibility 0s 0.25s, -webkit-transform 0.25s ease-in;
-moz-transition: visibility 0s 0.25s, -moz-transform 0.25s ease-in;
-ms-transition: visibility 0s 0.25s, -ms-transform 0.25s ease-in;
-o-transition: visibility 0s 0.25s, -o-transform 0.25s ease-in;
transition: visibility 0s 0.25s, transform 0.25s ease-in;
}

.cesium-navigation-help-visible {
visibility: visible;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
transition: transform 0.25s ease-out;
-webkit-transition: -webkit-transform 0.25s ease-out;
-moz-transition: -moz-transform 0.25s ease-out;
-ms-transition: -ms-transform 0.25s ease-out;
-o-transition: -o-transform 0.25s ease-out;
transition: transform 0.25s ease-out;
}

.cesium-navigation-help-instructions {
Expand Down
1 change: 1 addition & 0 deletions Source/Widgets/SceneModePicker/SceneModePicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ span.cesium-sceneModePicker-wrapper {

.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Webkit prefix is not needed for box-sizing, that was unprefixed long ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are certainly right, until we have a tool that let's you set a minimum version, I think we are better off just using the generated prefixes instead, otherwise it's just going to put them back the next time we run it.

box-sizing: border-box;
padding: 0;
margin: 3px 0;
Expand Down
2 changes: 0 additions & 2 deletions Source/Widgets/Timeline/Timeline.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
background: rgba(32, 32, 32, 0.8);
background: -moz-linear-gradient(top, rgba(116,117,119,0.8) 0%, rgba(58,68,82,0.8) 11%, rgba(46,50,56,0.8) 46%, rgba(53,53,53,0.8) 81%, rgba(53,53,53,0.8) 100%); /* FF3.6+ */
background: -webkit-linear-gradient(top, rgba(116,117,119,0.8) 0%,rgba(58,68,82,0.8) 11%,rgba(46,50,56,0.8) 46%,rgba(53,53,53,0.8) 81%,rgba(53,53,53,0.8) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(116,117,119,0.8) 0%,rgba(58,68,82,0.8) 11%,rgba(46,50,56,0.8) 46%,rgba(53,53,53,0.8) 81%,rgba(53,53,53,0.8) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(116,117,119,0.8) 0%,rgba(58,68,82,0.8) 11%,rgba(46,50,56,0.8) 46%,rgba(53,53,53,0.8) 81%,rgba(53,53,53,0.8) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(116,117,119,0.8) 0%,rgba(58,68,82,0.8) 11%,rgba(46,50,56,0.8) 46%,rgba(53,53,53,0.8) 81%,rgba(53,53,53,0.8) 100%); /* W3C */
}

Expand Down
2 changes: 0 additions & 2 deletions Source/Widgets/Timeline/lighter.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.cesium-lighter .cesium-timeline-bar {
background: -moz-linear-gradient(top, #eeeeee 0%, #ffffff 50%, #fafafa 100%); /* FF3.6+ */
background: -webkit-linear-gradient(top, #eeeeee 0%,#ffffff 50%,#fafafa 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #eeeeee 0%,#ffffff 50%,#fafafa 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 50%,#fafafa 100%); /* IE10+ */
background: linear-gradient(to bottom, #eeeeee 0%,#ffffff 50%,#fafafa 100%); /* W3C */
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Widgets/Viewer/Viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
padding-right: 0;
color: #ffffff;
font-size: 10px;
text-shadow: 0px 0px 2px #000000;
text-shadow: 0 0 2px #000000;
}

.cesium-viewer-timelineContainer {
Expand Down
20 changes: 10 additions & 10 deletions Source/Widgets/lighterShared.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
.cesium-lighter .cesium-button {
color: #111; /* For text buttons */
fill: #111; /* For SVG buttons */
color: #111; /* For text buttons */
fill: #111; /* For SVG buttons */
background: #e2f0ff;
border: 1px solid #759dc0;
}

.cesium-lighter .cesium-button:focus {
color: #000; /* For text buttons */
fill: #000; /* For SVG buttons */
color: #000; /* For text buttons */
fill: #000; /* For SVG buttons */
border-color: #ea4;
}

.cesium-lighter .cesium-button:hover {
color: #000; /* For text buttons */
fill: #000; /* For SVG buttons */
color: #000; /* For text buttons */
fill: #000; /* For SVG buttons */
background: #a6d2ff;
border-color: #aef;
box-shadow: 0 0 8px #777;
}

.cesium-lighter .cesium-button:active {
color: #fff; /* For text buttons */
fill: #fff; /* For SVG buttons */
color: #fff; /* For text buttons */
fill: #fff; /* For SVG buttons */
background: #48b;
border-color: #ea0;
}
Expand All @@ -33,7 +33,7 @@
.cesium-lighter .cesium-button-disabled:active {
background: #ccc;
border-color: #999;
color: #999; /* For text buttons */
fill: #999; /* For SVG buttons */
color: #999; /* For text buttons */
fill: #999; /* For SVG buttons */
box-shadow: none;
}
24 changes: 13 additions & 11 deletions Source/Widgets/shared.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,37 @@
position: relative;
background: #303336;
border: 1px solid #444;
color: #edffff; /* For text buttons */
fill: #edffff; /* For SVG buttons */
color: #edffff; /* For text buttons */
fill: #edffff; /* For SVG buttons */
border-radius: 4px;
padding: 5px 12px;
margin: 2px 3px;
cursor: pointer;
overflow: hidden;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}

.cesium-button:focus {
color: #fff; /* For text buttons */
fill: #fff; /* For SVG buttons */
color: #fff; /* For text buttons */
fill: #fff; /* For SVG buttons */
border-color: #ea4;
outline: none;
}

.cesium-button:hover {
color: #fff; /* For text buttons */
fill: #fff; /* For SVG buttons */
color: #fff; /* For text buttons */
fill: #fff; /* For SVG buttons */
background: #48b;
border-color: #aef;
box-shadow: 0 0 8px #fff;
}

.cesium-button:active {
color: #000; /* For text buttons */
fill: #000; /* For SVG buttons */
color: #000; /* For text buttons */
fill: #000; /* For SVG buttons */
background: #adf;
border-color: #fff;
box-shadow: 0 0 8px #fff;
Expand All @@ -54,8 +55,8 @@
.cesium-button-disabled:active {
background: #303336;
border-color: #444;
color: #646464; /* For text buttons */
fill: #646464; /* For SVG buttons */
color: #646464; /* For text buttons */
fill: #646464; /* For SVG buttons */
box-shadow: none;
cursor: default;
}
Expand All @@ -71,11 +72,12 @@

.cesium-toolbar-button {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 32px;
height: 32px;
border-radius: 14%;
padding: 0;
vertical-align: middle;
z-index: 0; /* Workaround for rounded raster image corners in Chrome */
z-index: 0; /* Workaround for rounded raster image corners in Chrome */
}