[style] added scripts to adapt border width

This commit is contained in:
Maxim Kadushkin 2020-12-10 22:47:28 +03:00
parent 559e97dd1c
commit c67a7b088d
6 changed files with 34 additions and 7 deletions

View file

@ -296,3 +296,18 @@
} }
} }
} }
.adaptive-border-width(@width, @borderside: all) {
@lb-border-width: if((@borderside = all), border-width, e('border-@{borderside}-width'));
@{lb-border-width}: @width;
@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)
{
@{lb-border-width}: (@width / 1.5);
}
}
}

View file

@ -5,6 +5,7 @@
.btn { .btn {
border-radius: 1px; border-radius: 1px;
color: @gray-deep; color: @gray-deep;
.adaptive-border-width(1px);
.btnsize(@value) { .btnsize(@value) {
min-width: @value; min-width: @value;
@ -547,7 +548,8 @@
width: 45px; width: 45px;
height: 22px; height: 22px;
padding: 1px 11px 1px 1px; padding: 1px 11px 1px 1px;
border:1px solid @input-border; //border:1px solid @input-border;
.adaptive-solid-border(1px, @input-border);
.border-radius(@border-radius-small); .border-radius(@border-radius-small);
span:nth-child(1) { span:nth-child(1) {

View file

@ -3,6 +3,8 @@
} }
.dropdown-menu { .dropdown-menu {
.adaptive-border-width(1px);
&.scrollable-menu { &.scrollable-menu {
height: auto; height: auto;
max-height: 400px; max-height: 400px;

View file

@ -9,6 +9,8 @@
outline: 0; outline: 0;
.box-shadow(none); .box-shadow(none);
} }
.adaptive-border-width(1px);
} }
.form-control[readonly] { .form-control[readonly] {

View file

@ -9,7 +9,8 @@
.separator { .separator {
display: inline-block; display: inline-block;
position: inherit; position: inherit;
border-left: 1px solid @gray-dark; //border-left: 1px solid @gray-dark;
.adaptive-solid-border(1px, @gray-dark, left);
vertical-align: top; vertical-align: top;
padding: 0; padding: 0;
width: 0; width: 0;
@ -20,6 +21,7 @@
border-left: none; border-left: none;
border-right: none; border-right: none;
border-top: 1px solid @gray-dark; //border-top: 1px solid @gray-dark;
.adaptive-solid-border(1px, @gray-dark, top);
} }
} }

View file

@ -16,7 +16,8 @@
a { a {
padding: 0; padding: 0;
border: 1px solid #fff; //border: 1px solid #fff;
.adaptive-solid-border(1px, #fff);
float: left; float: left;
text-decoration: none; text-decoration: none;
-moz-outline: 0 none; -moz-outline: 0 none;
@ -24,7 +25,8 @@
cursor: pointer; cursor: pointer;
em span { em span {
border: 1px solid rgba(0, 0, 0, 0.2); //border: 1px solid rgba(0, 0, 0, 0.2);
.adaptive-solid-border(1px, rgba(0, 0, 0, 0.2));
} }
&:hover, &.selected { &:hover, &.selected {
@ -36,13 +38,15 @@
} }
.dynamic-empty-color em span { .dynamic-empty-color em span {
border:solid 1px #C0C0C0; //border:solid 1px #C0C0C0;
.adaptive-solid-border(1px, #C0C0C0);
background:#ffffff background:#ffffff
} }
.color-transparent { .color-transparent {
em span { em span {
border:solid 1px #C0C0C0; //border:solid 1px #C0C0C0;
.adaptive-solid-border(1px, #C0C0C0);
} }
} }
} }