Bug 1238133 - Part 1: Make only one instance of fonts.css and rules.css r=bgrins

This commit is contained in:
Gabriel Luong 2016-01-13 00:37:32 -08:00
parent ee09fb2a0b
commit 3288f619f9
7 changed files with 155 additions and 175 deletions

View File

@ -1,51 +0,0 @@
/* 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/. */
.dim > #root,
.font:not(.has-code) .font-css-code,
.font-is-local,
.font-is-remote,
.font.is-local .font-format-url,
#template {
display: none;
}
.font.is-remote .font-is-remote,
.font.is-local .font-is-local {
display: inline;
}
.font-format::before {
content: "(";
}
.font-format::after {
content: ")";
}
.preview-input-toolbar {
display: flex;
width: 100%;
}
.font-preview-container {
overflow-x: auto;
}
#preview-text-input {
font: inherit;
margin-top: 1px;
margin-bottom: 1px;
padding-top: 0;
padding-bottom: 0;
flex: 1;
}
:root {
height: 100%;
}
#root {
overflow: auto;
}

View File

@ -11,7 +11,6 @@
<head>
<title>&title;</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="fonts.css" type="text/css"/>
<link rel="stylesheet" href="chrome://devtools/skin/common.css" type="text/css"/>
<link rel="stylesheet" href="chrome://devtools/skin/fonts.css" type="text/css"/>
<script type="application/javascript;version=1.8" src="chrome://devtools/content/shared/theme-switching.js"/>

View File

@ -1,118 +0,0 @@
/* 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/. */
* {
box-sizing: border-box;
}
:root {
height: 100%;
}
body {
margin: 0;
display: flex;
flex-direction: column;
height: 100%;
}
#ruleview-container {
-moz-user-select: text;
overflow: auto;
min-height: 0;
flex: 1;
}
#ruleview-container.non-interactive {
pointer-events: none;
visibility: collapse;
transition: visibility 0.25s;
}
.devtools-toolbar {
width: 100%;
display: flex;
}
#pseudo-class-panel {
position: relative;
margin-top: -1px;
margin-bottom: -1px;
overflow-y: hidden;
max-height: 24px;
outline: 0 !important;
transition-property: max-height;
transition-duration: 150ms;
transition-timing-function: ease;
}
#pseudo-class-panel[hidden] {
max-height: 0px;
}
#pseudo-class-panel > label {
-moz-user-select: none;
flex-grow: 1;
display: flex;
align-items: center;
}
.ruleview {
overflow: auto;
-moz-user-select: text;
}
.ruleview-code {
direction: ltr;
}
.ruleview-property:not(:hover) > .ruleview-enableproperty {
pointer-events: none;
}
.ruleview-namecontainer {
cursor: text;
}
.ruleview-propertyvaluecontainer {
cursor: text;
padding-right: 5px;
}
.ruleview-propertyvaluecontainer a {
cursor: pointer;
}
.ruleview-computedlist,
.ruleview-overridden-rule-filter[hidden],
.ruleview-warning[hidden] {
display: none;
}
.ruleview-computedlist[user-open],
.ruleview-computedlist[filter-open] {
display: block;
}
.ruleview-expandable-container {
display: none;
}
.show-expandable-container + .ruleview-expandable-container {
display: block;
}
.ruleview .ruleview-expander {
vertical-align: middle;
}
.ruleview-header {
vertical-align: middle;
min-height: 1.5em;
line-height: 1.5em;
}
.ruleview-header.ruleview-expandable-header {
cursor: pointer;
}

View File

@ -17,7 +17,6 @@
<title>&ruleViewTitle;</title>
<link rel="stylesheet" href="chrome://global/skin/global.css" type="text/css"/>
<link rel="stylesheet" href="chrome://devtools/skin/common.css" type="text/css"/>
<link rel="stylesheet" href="chrome://devtools/content/inspector/rules/rules.css" type="text/css"/>
<link rel="stylesheet" href="chrome://devtools/skin/rules.css" type="text/css"/>
<script type="application/javascript;version=1.8" src="chrome://devtools/content/shared/theme-switching.js"/>
<script type="application/javascript;version=1.8">
@ -52,7 +51,7 @@
</div>
</div>
<div id="ruleview-container" class="ruleview devtools-monospace">
<div id="ruleview-container" class="devtools-monospace">
</div>
</body>
</html>

View File

@ -27,14 +27,12 @@ devtools.jar:
content/styleeditor/styleeditor.css (styleeditor/styleeditor.css)
content/storage/storage.xul (storage/storage.xul)
content/inspector/computed/computed.xhtml (inspector/computed/computed.xhtml)
content/inspector/fonts/fonts.css (inspector/fonts/fonts.css)
content/inspector/fonts/fonts.js (inspector/fonts/fonts.js)
content/inspector/fonts/fonts.xhtml (inspector/fonts/fonts.xhtml)
content/inspector/layout/layout.js (inspector/layout/layout.js)
content/inspector/layout/layout.xhtml (inspector/layout/layout.xhtml)
content/inspector/markup/markup.css (inspector/markup/markup.css)
content/inspector/markup/markup.xhtml (inspector/markup/markup.xhtml)
content/inspector/rules/rules.css (inspector/rules/rules.css)
content/inspector/rules/rules.xhtml (inspector/rules/rules.xhtml)
content/animationinspector/animation-controller.js (animationinspector/animation-controller.js)
content/animationinspector/animation-panel.js (animationinspector/animation-panel.js)

View File

@ -1,7 +1,15 @@
/* 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/. */
* {
box-sizing: border-box;
}
:root {
height: 100%;
}
body {
display: flex;
flex-direction: column;
@ -10,6 +18,10 @@ body {
padding-bottom: 20px;
}
#root {
overflow: auto;
}
#all-fonts {
padding: 0;
margin: 0;
@ -25,6 +37,46 @@ body {
right: 0;
}
.dim > #root,
.font:not(.has-code) .font-css-code,
.font-is-local,
.font-is-remote,
.font.is-local .font-format-url,
#template {
display: none;
}
.font.is-remote .font-is-remote,
.font.is-local .font-is-local {
display: inline;
}
.font-format::before {
content: "(";
}
.font-format::after {
content: ")";
}
.preview-input-toolbar {
display: flex;
width: 100%;
}
.font-preview-container {
overflow-x: auto;
}
#preview-text-input {
font: inherit;
margin-top: 1px;
margin-bottom: 1px;
padding-top: 0;
padding-bottom: 0;
flex: 1;
}
.font {
padding: 10px 10px;
}

View File

@ -13,10 +13,103 @@
--rule-filter-icon: url(images/magnifying-glass.png);
}
.ruleview {
* {
box-sizing: border-box;
}
:root {
height: 100%;
}
body {
margin: 0;
display: flex;
flex-direction: column;
height: 100%;
}
#ruleview-container {
-moz-user-select: text;
overflow: auto;
min-height: 0;
flex: 1;
height: 100%;
}
#ruleview-container.non-interactive {
pointer-events: none;
visibility: collapse;
transition: visibility 0.25s;
}
.devtools-toolbar {
width: 100%;
display: flex;
}
#pseudo-class-panel {
position: relative;
margin-top: -1px;
margin-bottom: -1px;
overflow-y: hidden;
max-height: 24px;
outline: 0 !important;
transition-property: max-height;
transition-duration: 150ms;
transition-timing-function: ease;
}
#pseudo-class-panel[hidden] {
max-height: 0px;
}
#pseudo-class-panel > label {
-moz-user-select: none;
flex-grow: 1;
display: flex;
align-items: center;
}
.ruleview-code {
direction: ltr;
}
.ruleview-property:not(:hover) > .ruleview-enableproperty {
pointer-events: none;
}
.ruleview-expandable-container {
display: none;
}
.show-expandable-container + .ruleview-expandable-container {
display: block;
}
.ruleview-namecontainer {
cursor: text;
}
.ruleview-propertyvaluecontainer {
cursor: text;
padding-right: 5px;
}
.ruleview-propertyvaluecontainer a {
cursor: pointer;
}
.ruleview-computedlist,
.ruleview-overridden-rule-filter[hidden],
.ruleview-warning[hidden] {
display: none;
}
.ruleview-computedlist[user-open],
.ruleview-computedlist[filter-open] {
display: block;
}
.ruleview-rule-source {
text-align: end;
float: right;
@ -46,6 +139,9 @@
padding: 1px 4px;
-moz-user-select: none;
word-wrap: break-word;
vertical-align: middle;
min-height: 1.5em;
line-height: 1.5em;
}
:root[platform="win"] .ruleview-header,
@ -53,6 +149,10 @@
margin-top: 4px;
}
.ruleview-header.ruleview-expandable-header {
cursor: pointer;
}
.ruleview-rule-pseudo-element {
padding-left:20px;
border-left: solid 10px;
@ -148,6 +248,7 @@
}
.ruleview-expander {
vertical-align: middle;
display: inline-block;
}