gecko-dev/devtools/client/responsive.html/index.css
2016-04-11 05:53:00 +02:00

311 lines
6.1 KiB
CSS

/* TODO: May break up into component local CSS. Pending future discussions by
* React component group on how to best handle CSS. */
/**
* CSS Variables specific to the responsive design mode
*/
.theme-light {
--box-shadow: 0 4px 4px 0 rgba(155, 155, 155, 0.26);
--viewport-active-color: var(--theme-body-color);
--viewport-selection-arrow: url("./images/select-arrow.svg#light");
--viewport-selection-arrow-selected:
url("./images/select-arrow.svg#light-selected");
}
.theme-dark {
--box-shadow: 0 4px 4px 0 rgba(105, 105, 105, 0.26);
--viewport-active-color: var(--theme-selection-color);
--viewport-selection-arrow: url("./images/select-arrow.svg#dark");
--viewport-selection-arrow-selected:
url("./images/select-arrow.svg#dark-selected");
}
* {
box-sizing: border-box;
}
#root,
html, body {
margin: 0;
height: 100%;
}
#root {
display: flex;
flex-direction: column;
justify-content: center;
}
#app {
/* Center the viewports container */
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
/* Snap to the top of the app when there isn't enough vertical space anymore
to center the viewports (so we don't lose the global toolbar) */
position: sticky;
top: 0;
}
/**
* Common style for toolbars and toolbar buttons
*/
.toolbar {
background-color: var(--theme-toolbar-background);
border: 1px solid var(--theme-splitter-color);
}
.toolbar-button {
margin: 1px 3px;
width: 16px;
height: 16px;
/* Reset styles from .devtools-button */
min-width: initial;
min-height: initial;
align-self: center;
}
.toolbar-button:active::before {
filter: url("chrome://devtools/skin/images/filters.svg#checked-icon-state");
}
/**
* Global Toolbar
*/
#global-toolbar {
color: var(--theme-body-color-alt);
border-radius: 2px;
box-shadow: var(--box-shadow);
margin: 30px 0;
padding: 4px 5px;
display: inline-flex;
-moz-user-select: none;
}
#global-toolbar > .title {
border-right: 1px solid var(--theme-splitter-color);
padding: 1px 6px 0 2px;
}
#global-toolbar .toolbar-button {
margin: 0 0 0 5px;
padding: 0;
}
#global-toolbar .toolbar-button,
#global-toolbar .toolbar-button::before {
width: 12px;
height: 12px;
}
#global-screenshot-button::before {
background-image: url("./images/screenshot.svg");
margin: -6px 0 0 -6px;
}
#global-exit-button::before {
background-image: url("./images/close.svg");
margin: -6px 0 0 -6px;
}
#global-screenshot-button:disabled {
filter: url("chrome://devtools/skin/images/filters.svg#checked-icon-state");
opacity: 1 !important;
}
#viewports {
/* Make sure left-most viewport is visible when there's horizontal overflow.
That is, when the horizontal space become smaller than the viewports and a
scrollbar appears, then the first viewport will still be visible */
position: sticky;
left: 0;
/* Individual viewports are inline elements, make sure they stay on a single
line */
white-space: nowrap;
}
/**
* Viewport Container
*/
.viewport {
display: inline-block;
/* Align all viewports to the top */
vertical-align: top;
}
.resizable-viewport {
border: 1px solid var(--theme-splitter-color);
box-shadow: var(--box-shadow);
position: relative;
}
/**
* Viewport Toolbar
*/
.viewport-toolbar {
border-width: 0;
border-bottom-width: 1px;
display: flex;
flex-direction: row;
justify-content: center;
height: 18px;
}
.viewport-device-selector {
-moz-appearance: none;
background-color: var(--theme-toolbar-background);
background-image: var(--viewport-selection-arrow);
background-position: 136px;
background-repeat: no-repeat;
background-size: 7px;
border: none;
color: var(--theme-body-color-inactive);
height: 100%;
padding: 0 16px;
text-align: center;
text-overflow: ellipsis;
width: 150px;
}
.viewport-device-selector.selected {
background-image: var(--viewport-selection-arrow-selected);
color: var(--viewport-active-color);
}
.viewport-device-selector:focus {
background-image: var(--viewport-selection-arrow-selected);
/* Remove the outline from the select box */
color: transparent;
text-shadow: 0 0 0 var(--viewport-active-color);
}
.viewport-device-selector > option {
background-color: var(--theme-toolbar-background);
color: var(--viewport-active-color);
text-align: left;
padding: 5px;
}
.viewport-rotate-button {
position: absolute;
right: 0;
}
.viewport-rotate-button::before {
background-image: url("./images/rotate-viewport.svg");
}
/**
* Viewport Content
*/
.viewport-content.resizing {
pointer-events: none;
}
/**
* Viewport Browser
*/
.browser-container {
width: inherit;
height: inherit;
}
.browser {
display: block;
border: 0;
}
/**
* Viewport Resize Handles
*/
.viewport-resize-handle {
position: absolute;
width: 16px;
height: 16px;
bottom: 0;
right: 0;
background-image: url("./images/grippers.svg");
background-position: bottom right;
padding: 0 1px 1px 0;
background-repeat: no-repeat;
background-origin: content-box;
cursor: se-resize;
}
.viewport-resize-handle.hidden {
display: none;
}
.viewport-horizontal-resize-handle {
position: absolute;
width: 5px;
height: calc(100% - 16px);
right: -4px;
top: 0;
cursor: e-resize;
}
.viewport-vertical-resize-handle {
position: absolute;
width: calc(100% - 16px);
height: 5px;
left: 0;
bottom: -4px;
cursor: s-resize;
}
/**
* Viewport Dimension Label
*/
.viewport-dimension {
display: flex;
justify-content: center;
font: 10px sans-serif;
margin-top: 10px;
}
.viewport-dimension-editable {
border-bottom: 1px solid transparent;
}
.viewport-dimension-editable,
.viewport-dimension-input {
color: var(--theme-body-color-inactive);
transition: all 0.25s ease;
}
.viewport-dimension-editable.editing,
.viewport-dimension-input.editing {
color: var(--viewport-active-color);
}
.viewport-dimension-editable.editing {
border-bottom: 1px solid var(--theme-selection-background);
}
.viewport-dimension-editable.editing.invalid {
border-bottom: 1px solid #d92215;
}
.viewport-dimension-input {
background: transparent;
border: none;
text-align: center;
}
.viewport-dimension-separator {
-moz-user-select: none;
}