[common] refactoring for button's stylesheet
This commit is contained in:
parent
09a2df443f
commit
66bd9697a2
|
@ -149,6 +149,34 @@
|
|||
}
|
||||
}
|
||||
|
||||
.background-ximage-v2(@image, @w: auto, @h: auto, @repeat: no-repeat, @usedatauri: true) {
|
||||
background-image: if(@usedatauri, data-uri(%("%s",@image)), ~"url(@{image})");
|
||||
background-repeat: @repeat;
|
||||
|
||||
@1d5ximage: replace(@image, '\.png$', '@1.5x.png');
|
||||
@1d75ximage: replace(@image, '\.png$', '@1.75x.png');
|
||||
@1d25ximage: replace(@image, '\.png$', '@1.25x.png');
|
||||
@2ximage: replace(@image, '\.png$', '@2x.png');
|
||||
|
||||
@media only screen {
|
||||
@media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9),
|
||||
(min-resolution: 1.5dppx) and (max-resolution: 1.9dppx),
|
||||
(min-resolution: 144dpi) and (max-resolution: 191dpi)
|
||||
{
|
||||
background-image: ~"url(@{1d5ximage})";
|
||||
background-size: @w @h;
|
||||
}
|
||||
|
||||
@media (-webkit-min-device-pixel-ratio: 2),
|
||||
(min-resolution: 2dppx),
|
||||
(min-resolution: 192dpi)
|
||||
{
|
||||
background-image: ~"url(@{2ximage})";
|
||||
background-size: @w @h;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@common-controls-width: 100px;
|
||||
.img-commonctrl,
|
||||
.theme-colorpalette .color-transparent, .palette-color-ext .color-transparent, .dropdown-menu li .checked:before, .input-error:before,
|
||||
|
|
|
@ -249,15 +249,7 @@
|
|||
line-height: 20px;
|
||||
|
||||
&:not(svg) {
|
||||
@media
|
||||
only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
||||
only screen and (min-resolution: 1.5dppx),
|
||||
only screen and (min-resolution: 144dpi) {
|
||||
background-image: ~"url('@{app-image-const-path}/toolbar-menu@1.5x.png')";
|
||||
background-size: 60px auto;
|
||||
}
|
||||
|
||||
.background-ximage('@{app-image-path}/toolbar-menu.png', '@{app-image-path}/toolbar-menu@2x.png', 60px);
|
||||
.background-ximage-v2('@{app-image-const-path}/toolbar-menu.png', 60px, @usedatauri: false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,15 +266,7 @@
|
|||
|
||||
&.x-huge, .btn-group.x-huge > & {
|
||||
:not(svg).icon {
|
||||
@media
|
||||
only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
||||
only screen and (min-resolution: 1.5dppx),
|
||||
only screen and (min-resolution: 144dpi) {
|
||||
background-image: ~"url('@{common-image-const-path}/controls/toolbarbig@1.5x.png')";
|
||||
background-size: 78px auto;
|
||||
}
|
||||
|
||||
.background-ximage('@{common-image-path}/controls/toolbarbig.png', '@{common-image-path}/controls/toolbarbig@2x.png', 78px);
|
||||
.background-ximage-v2('@{common-image-const-path}/controls/toolbarbig.png', 78px, @usedatauri: false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue