Commit 2e0dfbfb authored by Nikolay Gromov's avatar Nikolay Gromov

Небольшие правки «глобальных» стилей

parent dfd83370
...@@ -217,10 +217,10 @@ block content ...@@ -217,10 +217,10 @@ block content
include:markdown-it(linkify, html='true', typographer='true', quotes='«»') blocks/alert/readme.md include:markdown-it(linkify, html='true', typographer='true', quotes='«»') blocks/alert/readme.md
+alert() +alert()
p Обычное сообщение p Обычное сообщение
+close('Закрыть', 'sm')(class='alert__close') +close('Закрыть', 'sm')(class='alert__close', aria-label='Закрыть')
+alert('Заголовок', 'warning, some-mod-name') +alert('Заголовок', 'warning, some-mod-name')
p Блок сообщения с модификаторами. p Блок сообщения с модификаторами.
+close('Закрыть', 'sm')(class='alert__close') +close('Закрыть', 'sm')(class='alert__close', aria-label='Закрыть')
+block-lib-code() +block-lib-code()
include:show-code(first-line='//- Pug-файл этого блока:') blocks/alert/alert.pug include:show-code(first-line='//- Pug-файл этого блока:') blocks/alert/alert.pug
......
...@@ -10,13 +10,13 @@ mixin alert(title, mods) ...@@ -10,13 +10,13 @@ mixin alert(title, mods)
p Текст p Текст
+alert('Внимание', 'warning, some-mod-name') +alert('Внимание', 'warning, some-mod-name')
p Предупреждение p Предупреждение
+close('Закрыть', 'sm')(class='alert__close') +close('Закрыть', 'sm')(class='alert__close', aria-label='Закрыть')
+alert('Внимание', 'danger') +alert('Внимание', 'danger')
p Проблема p Проблема
+close('Закрыть', 'sm')(class='alert__close') +close('Закрыть', 'sm')(class='alert__close', aria-label='Закрыть')
+alert('Внимание', 'success') +alert('Внимание', 'success')
p Успех p Успех
+close('Закрыть', 'sm')(class='alert__close') +close('Закрыть', 'sm')(class='alert__close', aria-label='Закрыть')
- -
//- список модификаторов //- список модификаторов
...@@ -29,7 +29,7 @@ mixin alert(title, mods) ...@@ -29,7 +29,7 @@ mixin alert(title, mods)
} }
} }
.alert(class=allMods)&attributes(attributes) .alert(class=allMods, role='alert')&attributes(attributes)
if (typeof(title) !== 'undefined' && title !== '') if (typeof(title) !== 'undefined' && title !== '')
h4.alert__header!= title h4.alert__header!= title
block block
...@@ -15,7 +15,7 @@ $border-radius: 3px !default; ...@@ -15,7 +15,7 @@ $border-radius: 3px !default;
$block-name: &; // #{$block-name}__element $block-name: &; // #{$block-name}__element
position: relative; position: relative;
padding: 0.7em 1.5em 0.7em 1em; padding: 0.7em 1.5em 0.7em 1.4em;
margin-top: 1em; margin-top: 1em;
margin-bottom: 1em; margin-bottom: 1em;
border: 1px solid $gray-lighter; border: 1px solid $gray-lighter;
...@@ -37,10 +37,10 @@ $border-radius: 3px !default; ...@@ -37,10 +37,10 @@ $border-radius: 3px !default;
&__header { &__header {
display: block; display: block;
margin-top: 0; margin-top: 0;
margin-bottom: 0.2em; margin-bottom: 0.4em;
font-size: $font-size--h3; font-size: $font-size--h3;
font-weight: 400; font-weight: 400;
line-height: 1.4; line-height: 1.2;
color: inherit; color: inherit;
} }
......
...@@ -77,12 +77,16 @@ textarea { ...@@ -77,12 +77,16 @@ textarea {
touch-action: manipulation; touch-action: manipulation;
} }
// Мы любим EDGE! Это браузер! (Спорное замечание.)
svg { svg {
a &, a &,
button & { button & {
pointer-events: none; pointer-events: none; // Мы любим EDGE! Это браузер! (нет)
}
&:not(:root) {
overflow: hidden; // Скрыть выступающее за границы в IE
} }
} }
...@@ -93,7 +97,9 @@ img { ...@@ -93,7 +97,9 @@ img {
a { a {
color: $link-color; color: $link-color;
background-color: transparent;
text-decoration-skip: ink; text-decoration-skip: ink;
-webkit-text-decoration-skip: objects; // stylelint-disable-line property-no-vendor-prefix
transition: color 0.3s; transition: color 0.3s;
&:hover, &:hover,
...@@ -105,3 +111,8 @@ a { ...@@ -105,3 +111,8 @@ a {
color: $link-color--hover; color: $link-color--hover;
} }
} }
hr {
box-sizing: content-box; // Проблема Firefox
overflow: visible; // Проблема Edge и IE
}
...@@ -20,8 +20,6 @@ $field-padding-horizontal: 0.7em !default; ...@@ -20,8 +20,6 @@ $field-padding-horizontal: 0.7em !default;
display: block; display: block;
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
margin-top: $line-height;
margin-bottom: $line-height;
border: 1px solid $border-color; border: 1px solid $border-color;
table { table {
......
...@@ -121,11 +121,12 @@ p, ...@@ -121,11 +121,12 @@ p,
ul, ul,
ol, ol,
dl, dl,
table,
blockquote, blockquote,
pre, pre,
address, address,
figure { figure {
margin-top: ($line-height / 2); margin-top: 0;
margin-bottom: ($line-height / 2); margin-bottom: ($line-height / 2);
} }
......
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