Convert highlighter.css to less

Change-Id: I41f6d9536a589b6423f4fc619d5058335083a570
This commit is contained in:
Ed Sanders 2020-12-23 16:50:32 +00:00
parent cb4a833cd2
commit fb6146053a
3 changed files with 78 additions and 79 deletions

View file

@ -97,7 +97,7 @@
"dt.debug.js",
"highlighter.js"
],
"styles": "highlighter.css",
"styles": "highlighter.less",
"dependencies": [
"ext.discussionTools.init"
]

View file

@ -1,78 +0,0 @@
/* stylelint-disable color-named */
/* stylelint-disable unit-blacklist */
.dt-highlighter-timestamp {
border: 2px solid forestgreen;
border-radius: 6px;
margin: -2px;
}
.dt-highlighter-signature {
border: 2px solid blue;
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
border-right: 0;
margin: -2px;
margin-right: 0;
}
.dt-highlighter-signature + .dt-highlighter-timestamp {
border-left: 0;
padding-left: 0;
margin-left: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.dt-highlighter-timestamp:hover:after {
content: ' ' attr( title );
}
.dt-highlighter-comment {
position: absolute;
opacity: 0.2;
pointer-events: none;
}
.dt-highlighter-comment:nth-of-type( 2n ) {
background: lightpink;
}
.dt-highlighter-comment:nth-of-type( 2n + 1 ) {
background: skyblue;
}
.dt-highlighter-comment-ruler {
position: absolute;
box-sizing: border-box;
border-left: 2px solid #ccc;
border-bottom: 2px solid #ccc;
border-bottom-left-radius: 3px;
}
.dt-highlighter-comment-warnings {
position: absolute;
color: transparent;
font-size: 0;
height: 1em;
width: 1em;
pointer-events: none;
}
.dt-highlighter-comment-warnings:hover {
background: white;
color: red;
font-size: inherit;
pointer-events: all;
}
.dt-highlighter-comment-warnings:before {
content: '⚠';
color: #000;
background: #fff;
font-size: 1rem;
pointer-events: all;
margin-left: -1em;
position: absolute;
z-index: 1;
}

77
modules/highlighter.less Normal file
View file

@ -0,0 +1,77 @@
/* stylelint-disable color-named */
.dt-highlighter-timestamp {
border: 2px solid forestgreen;
border-radius: 6px;
margin: -2px;
&:hover:after {
content: ' ' attr( title );
}
}
.dt-highlighter-signature {
border: 2px solid blue;
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
border-right: 0;
margin: -2px;
margin-right: 0;
& + .dt-highlighter-timestamp {
border-left: 0;
padding-left: 0;
margin-left: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
}
.dt-highlighter-comment {
position: absolute;
opacity: 0.2;
pointer-events: none;
&:nth-of-type( 2n ) {
background: lightpink;
}
&:nth-of-type( 2n + 1 ) {
background: skyblue;
}
&-ruler {
position: absolute;
box-sizing: border-box;
border-left: 2px solid #ccc;
border-bottom: 2px solid #ccc;
border-bottom-left-radius: 3px;
}
&-warnings {
position: absolute;
color: transparent;
font-size: 0;
height: 1em;
width: 1em;
pointer-events: none;
&:hover {
background: white;
color: red;
font-size: inherit;
pointer-events: all;
}
&:before {
content: '⚠';
color: #000;
background: #fff;
font-size: 1rem;
pointer-events: all;
margin-left: -1em;
position: absolute;
z-index: 1;
}
}
}