gecko-dev/devtools/client/themes/rules.css
fvsch 53b58056e8 Bug 1490491 - Part 4: replace 2 png icons, remove 2 unused; r=pbro
Depends on D5954

Differential Revision: https://phabricator.services.mozilla.com/D5955

--HG--
extra : moz-landing-system : lando
2018-10-22 14:47:28 +00:00

613 lines
13 KiB
CSS

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* CSS Variables specific to this panel that aren't defined by the themes */
:root {
--rule-highlight-background-color: var(--theme-highlight-yellow);
--rule-overridden-item-border-color: var(--theme-content-color3);
--rule-header-background-color: var(--theme-toolbar-background);
--rule-flex-toggle-color: var(--grey-90);
--rule-shape-toggle-color: var(--grey-90);
}
:root.theme-dark {
--rule-highlight-background-color: #521C76;
--rule-overridden-item-border-color: var(--theme-content-color1);
--rule-header-background-color: #222225;
--rule-flex-toggle-color: var(--grey-10);
--rule-shape-toggle-color: var(--grey-10);
}
/* Rule View Tabpanel */
#sidebar-panel-ruleview {
margin: 0;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
/* Override the min-width from .inspector-tabpanel, as the rule panel can support small
widths */
min-width: 100px;
}
/* Rule View Toolbar */
#ruleview-toolbar-container {
display: flex;
flex-direction: column;
height: auto;
}
#ruleview-toolbar {
display: flex;
}
#ruleview-toolbar > .devtools-searchbox:first-child {
padding-inline-start: 0px;
}
#ruleview-command-toolbar {
display: flex;
}
.ruleview-reveal-panel {
display: flex;
overflow: hidden;
flex-wrap: wrap;
}
.ruleview-reveal-panel[hidden] {
display: none;
}
.ruleview-reveal-panel label {
-moz-user-select: none;
flex-grow: 1;
display: flex;
align-items: center;
}
/* Class toggle panel */
#ruleview-class-panel:not([hidden]) {
/* The class panel can contain 0 to N classes, so we can't hardcode a height here like
we do for the pseudo-class panel. Unfortunately, that means we don't get the height
transition when toggling the panel */
flex-direction: column;
}
#ruleview-class-panel .add-class {
margin: 0;
border-width: 0 0 1px 0;
padding: 2px 6px;
border-radius: 0;
}
#ruleview-class-panel .classes {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
#ruleview-class-panel .classes {
max-height: 100px;
overflow-y: auto;
}
#ruleview-class-panel .classes label {
flex: 0 0;
max-width: 50%;
}
#ruleview-class-panel .classes label span {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
#ruleview-class-panel .no-classes {
flex: 1;
color: var(--theme-body-color-inactive);
margin: 0;
text-align: center;
}
/* Rule View Container */
#ruleview-container {
-moz-user-select: text;
overflow: auto;
flex: auto;
height: 100%;
}
/* This extra wrapper only serves as a way to get the content of the view focusable.
So that when the user reaches it either via keyboard or mouse, we know that the view
is focused and therefore can handle shortcuts.
However, for accessibility reasons, tabindex is set to -1 to avoid having to tab
through it, and the outline is hidden. */
#ruleview-container-focusable {
height: 100%;
outline: none;
}
#ruleview-container.non-interactive {
pointer-events: none;
visibility: collapse;
transition: visibility 0.25s;
}
.ruleview-code {
direction: ltr;
}
.ruleview-property:not(:hover) > .ruleview-enableproperty {
pointer-events: none;
}
.ruleview-expandable-container {
display: block;
}
.ruleview-namecontainer {
cursor: text;
margin-left: -35px;
}
.ruleview-computed > .ruleview-namecontainer {
margin: 0;
}
.ruleview-propertyvaluecontainer {
cursor: text;
padding-right: 5px;
}
.ruleview-propertyvaluecontainer a {
color: var(--theme-highlight-purple);
cursor: pointer;
}
.ruleview-computedlist,
.ruleview-expandable-container[hidden],
.ruleview-overridden-items[hidden],
.ruleview-overridden-rule-filter[hidden],
.ruleview-warning[hidden],
.ruleview-overridden .ruleview-grid {
display: none;
}
.ruleview-computedlist[user-open],
.ruleview-computedlist[filter-open],
.ruleview-overridden-items {
display: block;
}
.ruleview-rule-source {
text-align: end;
float: right;
max-width: 100%;
/* Force RTL direction to crop the source link at the beginning. */
direction: rtl;
overflow: hidden;
text-overflow: ellipsis;
-moz-user-select: none;
margin-bottom: 2px;
}
.ruleview-rule-source-label {
white-space: nowrap;
margin: 0;
cursor: pointer;
/* Create an LTR embed to avoid special characters being shifted to the start due to the
parent node direction: rtl; */
direction: ltr;
unicode-bidi: embed
}
.ruleview-rule-source[unselectable],
.ruleview-rule-source[unselectable] > .ruleview-rule-source-label {
cursor: default;
}
.ruleview-rule-source:not([unselectable]):hover {
text-decoration: underline;
}
.ruleview-header {
background: var(--rule-header-background-color);
border-bottom: 1px solid var(--theme-splitter-color);
color: var(--theme-toolbar-color);
font-size: 12px;
padding: 4px;
width: 100%;
align-items: center;
display: flex;
-moz-user-select: none;
}
.ruleview-expandable-header {
cursor: pointer;
}
.ruleview-expandable-header:hover {
background-color: var(--theme-toolbar-background-hover);
}
.ruleview-rule-pseudo-element {
padding-left:20px;
border-left: solid 10px;
}
.ruleview-rule {
border-bottom: 1px solid var(--theme-splitter-color);
padding: 2px 4px;
}
#ruleview-container-focusable > .ruleview-rule:last-child {
border-bottom: none;
}
/**
* Display rules that don't match the current selected element and uneditable
* user agent styles differently
*/
.ruleview-rule[unmatched=true],
.ruleview-rule[uneditable=true] {
background: var(--theme-tab-toolbar-background);
}
.ruleview-rule[unmatched=true] {
opacity: 0.5;
}
.ruleview-rule[uneditable=true] :focus {
outline: none;
}
.ruleview-rule[uneditable=true] .theme-link {
color: var(--theme-highlight-bluegrey);
}
.ruleview-rule[uneditable=true] .ruleview-enableproperty {
visibility: hidden;
}
.ruleview-rule[uneditable=true] .ruleview-swatch {
cursor: default;
}
.ruleview-rule[uneditable=true] .ruleview-namecontainer > .ruleview-propertyname,
.ruleview-rule[uneditable=true] .ruleview-propertyvaluecontainer >
.ruleview-propertyvalue {
border-bottom-color: transparent;
}
.ruleview-overridden-rule-filter {
background-image: url(chrome://devtools/skin/images/filter.svg#filterinput);
background-size: 11px 11px;
margin-inline-start: 5px;
display: inline-block;
width: 11px;
height: 11px;
}
.ruleview-ruleopen {
padding-inline-end: 5px;
}
.ruleview-ruleclose {
clear: both;
cursor: text;
padding-right: 20px;
}
.ruleview-propertylist {
list-style: none;
padding: 0;
margin: 0;
}
.ruleview-enableproperty {
position: relative;
float: left;
left: -38px;
box-sizing: content-box;
border-left: 10px solid transparent;
background-clip: content-box;
}
.ruleview-warning {
display: inline-block;
width: 12px;
height: 12px;
margin-inline-start: 5px;
background-image: url(chrome://devtools/skin/images/alert.svg);
background-size: cover;
-moz-context-properties: fill;
fill: var(--yellow-60);
}
.ruleview-rule:not(:hover) .ruleview-enableproperty {
visibility: hidden;
}
.ruleview-expander {
vertical-align: middle;
}
.ruleview-propertycontainer .ruleview-expander {
margin-left: -6px;
}
.ruleview-expander.theme-twisty:dir(rtl):not([open]) {
/* for preventing .theme-twisty's wrong direction in rtl; Bug 1296648 */
transform: rotate(-90deg);
}
.ruleview-newproperty {
margin-inline-start: -10px;
}
.ruleview-namecontainer,
.ruleview-propertyvaluecontainer,
.ruleview-propertyname,
.ruleview-propertyvalue {
text-decoration: inherit;
}
.ruleview-computedlist {
list-style: none;
padding: 0;
}
.ruleview-overridden-items {
margin-inline-start: -25px;
list-style: none;
line-height: 1.5em;
}
.ruleview-overridden-item {
position: relative;
}
.ruleview-overridden-item::before {
position: absolute;
left: -15px;
top: 0px;
content: '';
display: block;
border-left: 0.5px solid var(--rule-overridden-item-border-color);
height: 0.8em;
border-bottom: 0.5px solid var(--rule-overridden-item-border-color);
width: 10px;
}
.ruleview-overridden-item::after {
position: absolute;
left: -15px;
bottom: -7px;
content: '';
display: block;
border-left: 0.5px solid var(--rule-overridden-item-border-color);
height: 100%;
}
.ruleview-overridden-item:last-child:after {
display: none;
}
.ruleview-overridden-item .ruleview-namecontainer {
margin-left: 0;
}
.ruleview-flex,
.ruleview-grid,
.ruleview-swatch {
cursor: pointer;
border-radius: 50%;
width: 1em;
height: 1em;
vertical-align: middle;
/* align the swatch with its value */
margin-top: -1px;
margin-inline-end: 5px;
display: inline-block;
position: relative;
}
.ruleview-flex {
background-image: url("chrome://devtools/skin/images/flexbox-swatch.svg");
background-size: 13px 11px;
-moz-context-properties: stroke;
stroke: var(--rule-flex-toggle-color);
width: 13px;
height: 11px;
border-radius: 0;
}
.ruleview-grid {
background: url("chrome://devtools/skin/images/grid.svg");
border-radius: 0;
}
.ruleview-grid[disabled] {
cursor: default;
opacity: 0.5;
}
.ruleview-shape-point.active,
.ruleview-shapeswatch.active + .ruleview-shape > .ruleview-shape-point:hover {
background-color: var(--rule-highlight-background-color);
}
.ruleview-colorswatch::before {
content: '';
background-color: #eee;
background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
background-size: 12px 12px;
background-position: 0 0, 6px 6px;
position: absolute;
border-radius: 50%;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
.ruleview-bezierswatch {
background: url("chrome://devtools/skin/images/cubic-bezier-swatch.svg");
background-size: 1em;
}
.ruleview-filterswatch {
background: url("chrome://devtools/skin/images/filter-swatch.svg");
background-size: 1em;
}
.ruleview-angleswatch {
background: url("chrome://devtools/skin/images/angle-swatch.svg");
background-size: 1em;
}
.ruleview-shapeswatch {
background: url("chrome://devtools/skin/images/shape-swatch.svg");
-moz-context-properties: stroke;
stroke: var(--rule-shape-toggle-color);
border-radius: 0;
background-size: 110% 110%;
box-shadow: none;
width: 1.45em;
height: 1.45em;
}
.ruleview-overridden {
text-decoration: line-through;
}
/**
* Hide swatches (tool icons) from properties that are overwritten by higher specificity * rules.
* .ruleview-swatch is a base class for many tool swatches (shapes, color, bezier curves)
* .ruleview-flex and .ruleview-grid are custom
*/
.ruleview-overridden .ruleview-flex,
.ruleview-overridden .ruleview-grid,
.ruleview-overridden .ruleview-swatch {
display: none;
}
.theme-light .ruleview-overridden {
text-decoration-color: var(--theme-content-color3);
}
.ruleview-font-family.used-font {
text-decoration: underline;
}
.styleinspector-propertyeditor {
border: 1px solid #CCC;
padding: 0;
margin: -1px -3px -1px -1px;
}
.ruleview-property {
border-left: 3px solid transparent;
clear: both;
padding-left: 28px;
}
.ruleview-propertycontainer > * {
vertical-align: middle;
}
.ruleview-property[dirty] {
border-left-color: var(--theme-highlight-green);
}
.ruleview-highlight > .ruleview-expander,
.ruleview-highlight > .ruleview-namecontainer,
.ruleview-highlight > .ruleview-propertyvaluecontainer,
.ruleview-highlight > .ruleview-rule-source-label,
.ruleview-highlight > .ruleview-selector {
background-color: var(--rule-highlight-background-color);
}
.ruleview-namecontainer > .ruleview-propertyname,
.ruleview-propertyvaluecontainer > .ruleview-propertyvalue {
border-bottom: 1px dashed transparent;
}
.ruleview-namecontainer:hover > .ruleview-propertyname,
.ruleview-propertyvaluecontainer:hover > .ruleview-propertyvalue {
border-bottom-color: hsl(0,0%,50%);
}
.ruleview-selectorcontainer {
word-wrap: break-word;
cursor: text;
}
.ruleview-selector-separator,
.ruleview-selector-unmatched,
.ruleview-unmatched-variable {
color: #888;
}
.ruleview-selector-matched > .ruleview-selector-attribute {
/* TODO: Bug 1178535 Awaiting UX feedback on highlight colors */
}
.ruleview-selector-matched > .ruleview-selector-pseudo-class {
/* TODO: Bug 1178535 Awaiting UX feedback on highlight colors */
}
.ruleview-selector-matched > .ruleview-selector-pseudo-class-lock {
font-weight: bold;
color: var(--theme-highlight-orange);
}
.ruleview-selectorhighlighter {
background: url("chrome://devtools/skin/images/vview-open-inspector.png") no-repeat 0 0;
padding-left: 16px;
margin-left: 5px;
cursor: pointer;
}
.ruleview-selectorhighlighter:hover {
filter: var(--theme-icon-checked-filter);
}
.ruleview-flex.active,
.ruleview-grid.active,
.ruleview-selectorhighlighter:active,
.ruleview-selectorhighlighter.highlighted,
.ruleview-shapeswatch.active {
filter: var(--theme-icon-checked-filter) brightness(0.9);
}
#ruleview-add-rule-button::before {
background-image: url("chrome://devtools/skin/images/add.svg");
}
#pseudo-class-panel-toggle::before {
background-image: url("chrome://devtools/skin/images/pseudo-class.svg");
}
#class-panel-toggle::before {
content: ".cls";
}
.ruleview-overridden-rule-filter {
opacity: 0.8;
}
.ruleview-overridden-rule-filter:hover {
opacity: 1;
}