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
cbf20eaa
Commit
cbf20eaa
authored
Nov 18, 2017
by
Nikolay Gromov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Группа полей и большая унификация стилей полей
parent
22403526
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
27 deletions
+73
-27
projectConfig.json
projectConfig.json
+2
-1
blocks-demo.html
src/blocks-demo.html
+54
-2
field-file.scss
src/blocks/field-file/field-file.scss
+1
-3
field-range.scss
src/blocks/field-range/field-range.scss
+1
-4
field-select.scss
src/blocks/field-select/field-select.scss
+1
-3
field-text.scss
src/blocks/field-text/field-text.scss
+1
-4
field-toggler.scss
src/blocks/field-toggler/field-toggler.scss
+1
-4
form.scss
src/blocks/form/form.scss
+2
-6
form-mixins.scss
src/scss/mixins/form-mixins.scss
+10
-0
No files found.
projectConfig.json
View file @
cbf20eaa
...
...
@@ -56,7 +56,8 @@
"tabs"
:
[],
"object-fit-polyfill"
:
[],
"embed-responsive"
:
[],
"pie-chart"
:
[]
"pie-chart"
:
[],
"fields-group"
:
[]
},
"addCssBefore"
:
[
"./src/scss/variables.scss"
,
...
...
src/blocks-demo.html
View file @
cbf20eaa
...
...
@@ -996,13 +996,65 @@
</section>
<section
class=
"blocks-library__item blocks-library__item--menusep"
id=
"fields-group"
data-name=
".fields-group"
>
<h2
class=
"blocks-library__item-title"
>
Группа полей
</h2>
<form
action=
"https://httpbin.org/post"
class=
"form"
method=
"post"
>
<div
class=
"fields-group"
>
<label
class=
"field-text"
>
<span
class=
"field-text__input-wrap"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
</span>
</label>
<div
class=
"field-actions"
>
<button
class=
"btn"
>
Отправить
</button>
</div>
</div>
<div
class=
"fields-group"
>
<label
class=
"field-text"
>
<span
class=
"field-text__input-wrap"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
<span
class=
"field-text__help-text"
>
Помощь
</span>
</span>
</label>
<label
class=
"field-text"
>
<span
class=
"field-text__input-wrap"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
<span
class=
"field-text__help-text"
>
Помощь
</span>
</span>
</label>
<div
class=
"field-actions"
>
<button
class=
"btn"
>
Отправить
</button>
</div>
</div>
</form>
<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
class=
"code"
>
<!-- <code><form action="https://httpbin.org/post" class="form" method="post"></code>
<code> <legend>Название формы</legend></code>
<code> <label class="field-text">...</label></code>
<code> <div class="field-actions">...</div></code>
<code></form></code> -->
</pre>
</div>
</div>
</section>
<section
class=
"blocks-library__item blocks-library__item--menusep"
id=
"form"
data-name=
".form"
>
<h2
class=
"blocks-library__item-title"
>
Форма
</h2>
<form
action=
"https://httpbin.org/post"
class=
"form"
method=
"post"
>
<fieldset>
<legend
>
Название формы
</legend>
<fieldset
class=
"form__fieldset"
>
<legend
class=
"form__legend"
>
Легенда
</legend>
<label
class=
"field-text"
>
<span
class=
"field-text__name"
>
Текстовое поле
</span>
<span
class=
"field-text__input-wrap"
>
...
...
src/blocks/field-file/field-file.scss
View file @
cbf20eaa
...
...
@@ -20,9 +20,7 @@ $border-radius: 3px !default;
margin-bottom
:
(
$line-height
/
2
);
&
__name
{
font-weight
:
700
;
display
:
block
;
margin-bottom
:
0
.4em
;
@include
field-name
;
}
&
__input-wrap
{
...
...
src/blocks/field-range/field-range.scss
View file @
cbf20eaa
...
...
@@ -17,10 +17,7 @@ $border-radius: 3px !default;
margin-bottom
:
(
$line-height
/
2
);
&
__name
{
font-weight
:
700
;
display
:
block
;
margin-bottom
:
0
.4em
;
line-height
:
$line-height
;
@include
field-name
;
}
&
__input-wrap
{
...
...
src/blocks/field-select/field-select.scss
View file @
cbf20eaa
...
...
@@ -17,9 +17,7 @@ $border-radius: 3px !default;
margin-bottom
:
(
$line-height
/
2
);
&
__name
{
font-weight
:
700
;
display
:
block
;
margin-bottom
:
0
.4em
;
@include
field-name
;
}
&
__input-wrap
{}
...
...
src/blocks/field-text/field-text.scss
View file @
cbf20eaa
...
...
@@ -22,10 +22,7 @@ $border-radius: 3px !default;
margin-bottom
:
(
$line-height
/
2
);
&
__name
{
display
:
block
;
margin-bottom
:
0
.4em
;
line-height
:
$line-height
;
font-weight
:
700
;
@include
field-name
;
}
&
__input-wrap
{
...
...
src/blocks/field-toggler/field-toggler.scss
View file @
cbf20eaa
...
...
@@ -15,10 +15,7 @@ $line-height: 1.375em !default;
margin-bottom
:
(
$line-height
/
2
);
&
__title
{
display
:
block
;
font-weight
:
700
;
line-height
:
$line-height
;
margin-bottom
:
0
.4em
;
@include
field-name
;
}
&
__input-wrap
{
...
...
src/blocks/form/form.scss
View file @
cbf20eaa
...
...
@@ -12,11 +12,7 @@ $line-height: 1.375em !default;
$block-name
:
&
;
// #{$block-name}__element
&
:not
(
:last-child
)
{
margin-bottom
:
$line-height
;
}
fieldset
{
&
__fieldset
{
min-width
:
0
;
padding
:
0
;
margin
:
0
;
...
...
@@ -27,7 +23,7 @@ $line-height: 1.375em !default;
}
}
legend
{
&
__
legend
{
display
:
block
;
width
:
100%
;
margin-top
:
$line-height
;
...
...
src/scss/mixins/form-mixins.scss
View file @
cbf20eaa
...
...
@@ -21,3 +21,13 @@
outline
:
0
;
box-shadow
:
0
0
0
2px
rgba
(
$color-main
,
$opacity
);
}
@mixin
field-name
{
$line-height
:
1
.375em
!
default
;
display
:
block
;
margin-bottom
:
0
.4em
;
line-height
:
$line-height
;
font-weight
:
700
;
}
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