Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
K
kpp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexandr Veselov
kpp
Commits
2e0dfbfb
Commit
2e0dfbfb
authored
Dec 22, 2017
by
Nikolay Gromov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Небольшие правки «глобальных» стилей
parent
dfd83370
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
14 deletions
+24
-14
blocks-demo.pug
src/blocks-demo.pug
+2
-2
alert.pug
src/blocks/alert/alert.pug
+4
-4
alert.scss
src/blocks/alert/alert.scss
+3
-3
page.scss
src/blocks/page/page.scss
+13
-2
table.scss
src/blocks/table/table.scss
+0
-2
typo.scss
src/blocks/typo/typo.scss
+2
-1
No files found.
src/blocks-demo.pug
View file @
2e0dfbfb
...
@@ -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
...
...
src/blocks/alert/alert.pug
View file @
2e0dfbfb
...
@@ -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
src/blocks/alert/alert.scss
View file @
2e0dfbfb
...
@@ -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
.4
em
;
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
.
2
em
;
margin-bottom
:
0
.
4
em
;
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
;
}
}
...
...
src/blocks/page/page.scss
View file @
2e0dfbfb
...
@@ -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
}
src/blocks/table/table.scss
View file @
2e0dfbfb
...
@@ -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
{
...
...
src/blocks/typo/typo.scss
View file @
2e0dfbfb
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment