Files
eruda/src/Elements/Elements.scss
2022-12-17 13:37:08 +08:00

243 lines
4.9 KiB
SCSS

@import '../style/variable';
@import '../style/mixin';
#elements {
padding-top: 40px;
padding-bottom: 24px;
font-size: 14px;
.control {
@include control();
padding: 10px 0;
.icon-eye {
right: 0;
}
}
.dom-viewer-container {
@include overflow-auto(y);
height: 100%;
padding: 5px 0;
}
.crumbs {
@include absolute(100%, 24px);
top: initial;
line-height: 24px;
bottom: 0;
border-top: 1px solid var(--border);
background: var(--darker-background);
color: var(--primary);
font-size: $font-size-s;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
li {
cursor: pointer;
padding: 0 7px;
display: inline-block;
&:hover,
&:last-child {
background: var(--highlight);
}
}
.icon-arrow-right {
font-size: $font-size-s;
position: relative;
top: 1px;
}
}
.detail {
@include absolute();
@include overflow-auto(y);
z-index: 10;
display: none;
background: var(--background);
}
.breadcrumb {
@include breadcrumb();
cursor: pointer;
transition: background-color $anim-duration, color $anim-duration;
&:active {
background: var(--highlight);
color: var(--select-foreground);
span {
color: var(--select-foreground);
}
}
}
.section {
border-bottom: 1px solid var(--border);
color: var(--foreground);
h2 {
@include right-btn();
color: var(--primary);
background: var(--darker-background);
border-top: 1px solid var(--border);
padding: $padding;
font-size: $font-size;
transition: background $anim-duration;
&.active-effect {
cursor: pointer;
}
&.active-effect:active {
background: var(--highlight);
color: var(--select-foreground);
}
}
margin-bottom: 10px;
}
.attributes {
font-size: $font-size-s;
a {
color: var(--link-color);
}
.table-wrapper {
@include overflow-auto(x);
}
table {
td {
padding: 5px 10px;
}
}
}
.text-content {
background: #fff;
.content {
@include overflow-auto(x);
padding: $padding;
}
}
.style-color {
position: relative;
top: 1px;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 2px;
border: 1px solid var(--border);
display: inline-block;
}
.box-model {
@include overflow-auto(x);
color: #222;
font-size: $font-size-s;
padding: $padding;
text-align: center;
white-space: nowrap;
border-bottom: 1px solid var(--color);
.label {
position: absolute;
margin-left: 3px;
padding: 0 2px;
}
.top,
.left,
.right,
.bottom {
display: inline-block;
}
.left,
.right {
vertical-align: middle;
}
.position,
.margin,
.border,
.padding,
.content {
position: relative;
background: #fff;
display: inline-block;
text-align: center;
vertical-align: middle;
padding: 3px;
margin: 3px;
}
.position {
border: 1px grey dotted;
}
.margin {
border: 1px dashed;
background: rgba(246, 178, 107, 0.66);
}
.border {
border: 1px #000 solid;
background: rgba(255, 229, 153, 0.66);
}
.padding {
border: 1px grey dashed;
background: rgba(147, 196, 125, 0.55);
}
.content {
border: 1px grey solid;
min-width: 100px;
background: rgba(111, 168, 220, 0.66);
}
}
.computed-style {
font-size: $font-size-s;
a {
color: var(--link-color);
}
.table-wrapper {
@include overflow-auto(y);
max-height: 200px;
border-top: 1px solid var(--border);
}
table {
td {
padding: 5px 10px;
&.key {
white-space: nowrap;
color: var(--var-color);
}
}
}
}
.styles {
font-size: $font-size-s;
.style-wrapper {
padding: $padding;
.style-rules {
border: 1px solid var(--border);
padding: $padding;
margin-bottom: 10px;
.rule {
padding-left: 2em;
word-break: break-all;
a {
color: var(--link-color);
}
span {
color: var(--var-color);
}
}
&:last-child {
margin-bottom: 0;
}
}
}
}
.listeners {
font-size: $font-size-s;
.listener-wrapper {
padding: $padding;
.listener {
margin-bottom: 10px;
overflow: hidden;
border: 1px solid var(--border);
.listener-type {
padding: $padding;
background: var(--darker-background);
color: var(--primary);
}
.listener-content {
li {
@include overflow-auto(x);
padding: $padding;
border-top: none;
}
}
}
}
}
}