mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
69 lines
1.9 KiB
Plaintext
Executable File
69 lines
1.9 KiB
Plaintext
Executable File
// LESS Hat 1.1.2
|
|
// LESSHat.com
|
|
// From creators of CSSHat.com
|
|
// 2012
|
|
// Petr Brzek & Jan Kuca
|
|
|
|
|
|
// .size
|
|
|
|
.size(@square){
|
|
width: @square;
|
|
height: @square;
|
|
}
|
|
|
|
.size(@width, @height){
|
|
width: @width;
|
|
height: @height;
|
|
}
|
|
|
|
// element{ .size(10px); } // render width:10px; height:10px;
|
|
// element{ .size(10px, 20px); } // render width:10px; height: 20px;
|
|
|
|
|
|
|
|
// .user-select
|
|
|
|
.user-select(@arguments:auto){
|
|
-webkit-user-select: @arguments;
|
|
-moz-user-select: @arguments;
|
|
-ms-user-select: @arguments;
|
|
user-select: @arguments;
|
|
}
|
|
|
|
// element{ .user-select(text); }
|
|
|
|
|
|
|
|
.font-smoothing(@state){
|
|
.font-smoothing(@state) when (@state = true) {
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
.font-smoothing(@state) when (@state = false) {
|
|
-webkit-font-smoothing: auto;
|
|
-moz-osx-font-smoothing: auto;
|
|
}
|
|
.font-smoothing(@state);
|
|
}
|
|
|
|
.image-2x(@image; @width; @height; @repeat: no-repeat; @important: false) {
|
|
@filename : ~`/(.*)\.(jpg|jpeg|png|gif)|$/.exec(@{image})[1] || ""`;
|
|
@extension : ~`/(.*)\.(jpg|jpeg|png|gif)|$/.exec(@{image})[2] || ""`;
|
|
background-image: ~`(function(){ return "url(@{filename}.@{extension})" + ("@{important}" == "true" ? ' !important' : '');})()`;
|
|
background-repeat: @repeat;
|
|
|
|
@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 1.25dppx) {
|
|
background-image: ~`(function(){ return "url(@{filename}@2x.@{extension})" + ("@{important}" == "true" ? ' !important' : '');})()`;
|
|
background-size: ~`(function(){ return "@{width} @{height}" + ("@{important}" == "true" ? ' !important' : '');})()`;
|
|
}
|
|
}
|
|
.display(@state){
|
|
.display(@state) when (@state = true) {
|
|
display: block;
|
|
}
|
|
.display(@state) when (@state = false) {
|
|
display: none;
|
|
}
|
|
.display(@state);
|
|
} |