Commit faf48754 authored by Nikolay Gromov's avatar Nikolay Gromov

library fixs

parent e34bb2b0
...@@ -11,6 +11,15 @@ ...@@ -11,6 +11,15 @@
Контент Контент
<div class="blocks-library__code-wrapper">
<span class="blocks-library__code-show-trigger" title="Показать код"><i class="blocks-library__code-icon"></i></span>
<div class="blocks-library__code">
<pre>
<code class="html">&lt;input type="text" value="Текстовое поле для сравнения высоты" style="width:70px"&gt;</code>
</pre>
</div>
</div>
</div> </div>
</section> </section>
......
...@@ -53,13 +53,13 @@ ...@@ -53,13 +53,13 @@
&__code-show-trigger { &__code-show-trigger {
display: block; display: block;
width: 3rem; width: 3rem;
height: 2rem; height: 20px;
cursor: pointer; cursor: pointer;
margin-bottom: 0.3em; margin-bottom: 0.3em;
@media (min-width: @screen-md) { @media (min-width: @screen-md) {
position: absolute; position: absolute;
top: 0; top: -2.9rem;
left: -4rem; left: -4rem;
} }
} }
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
&__code-icon { &__code-icon {
display: block; display: block;
width: 3rem; width: 3rem;
height: 0.2rem; height: 2px;
background-color: @gray-light; background-color: @gray-light;
&:before, &:before,
...@@ -75,35 +75,38 @@ ...@@ -75,35 +75,38 @@
position: absolute; position: absolute;
background-color: @gray-light; background-color: @gray-light;
width: 3rem; width: 3rem;
height: 0.2rem; height: 2px;
left: 0; left: 0;
content: ''; content: '';
} }
&:before { &:before {
top: 0.8rem; top: 8px;
} }
&:after { &:after {
top: 1.6rem; top: 16px;
} }
} }
&__code { &__code {
transition: max-height @transition-time;
overflow: hidden; overflow: hidden;
.js & { .js & {
max-height: 0; max-height: 0;
transition-duration: @transition-time;
transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
} }
.js &--shown { .js &--shown {
max-height: 410px; transition-duration: @transition-time;
transition-timing-function: ease-in;
max-height: 1000px;
} }
pre { pre {
margin: 0; margin: 0;
max-height: 410px; max-height: 500px;
} }
} }
} }
......
...@@ -8,20 +8,5 @@ ...@@ -8,20 +8,5 @@
top: 0; top: 0;
left: 0; left: 0;
visibility: hidden; visibility: hidden;
&:checked {
& ~ .btn {
.btn-color--active(@text-color; @gray-lighter; @gray-lighter);
}
& ~ .btn--main {
.btn-color--active(#fff; @color-main; @color-main);
}
& ~ .btn--success {
.btn-color--active(#fff; @color-success; @color-success);
}
& ~ .btn--danger {
.btn-color--active(#fff; @color-danger; @color-danger);
}
}
} }
} }
This diff is collapsed.
...@@ -53,59 +53,35 @@ ...@@ -53,59 +53,35 @@
// Примесь-генератор цветовых стилей // Примесь-генератор цветовых стилей
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
.btn-color(@color: @text-color; @background: @gray-lighter; @border: @gray-lighter) { .btn-color(@color: @text-color; @background: @gray-lighter; @border: @gray-lighter;) {
color: @color; color: @color;
background-color: @background; background-color: @background;
border-color: @border; border-color: @border;
&--hover, &--hover,
&:hover { &:hover {
.btn-color--hover(@color; @background; @border); .btn-color--mod(@color; darken(@background, 10%); darken(@border, 12%));
} }
&--active, &--active,
&:active, &:active,
&:focus { &:focus {
.btn-color--active(@color; @background; @border); .btn-color--mod(@color; darken(@background, 15%); darken(@border, 17%));
} }
&--disabled, &--disabled,
&:disabled { &:disabled {
.btn-color--disabled(@color; @background; @border); .btn-color--mod(@color; @background; @border);
} }
} }
//------------------------------------------------------------------------------
// Вспомогательная примесь-генератор цветовых стилей для hover
//------------------------------------------------------------------------------
.btn-color--hover(@color: @text-color; @background: @gray-lighter; @border: @gray-lighter) {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 12%);
}
//------------------------------------------------------------------------------
// Вспомогательная примесь-генератор цветовых стилей для active и focus
//------------------------------------------------------------------------------
.btn-color--active(@color: @text-color; @background: @gray-lighter; @border: @gray-lighter) {
color: @color;
background-color: darken(@background, 15%);
border-color: darken(@border, 17%);
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Вспомогательная примесь-генератор цветовых стилей для disabled // Вспомогательная примесь-генератор цветовых стилей для disabled
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
.btn-color--disabled(@color: @text-color; @background: @gray-lighter; @border: @gray-lighter) { .btn-color--mod(@color; @background; @border) {
color: @color; color: @color;
background-color: @background; background-color: @background;
border-color: @border; border-color: @border;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment