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
020d88ad
Commit
020d88ad
authored
Mar 09, 2016
by
Nikolay Gromov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fields-group fix
parent
4cc66cd2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
11 deletions
+135
-11
fields-group.less
src/blocks/fields-group/fields-group.less
+12
-7
fields-group__item--dropdown.less
src/blocks/fields-group/fields-group__item--dropdown.less
+25
-0
blocks_library.html
src/blocks_library.html
+96
-3
btn-mixins.less
src/less/mixins/btn-mixins.less
+1
-1
style.less
src/less/style.less
+1
-0
No files found.
src/blocks/fields-group/fields-group.less
View file @
020d88ad
...
@@ -41,9 +41,11 @@
...
@@ -41,9 +41,11 @@
}
}
}
}
// &--dropdown {} // Вынесено в отдельный файл, т.к. ситуация специфическая, редкая
&:not(:last-child) {
&:not(:last-child) {
input,
.field-text__
input,
select {
.field-select__
select {
border-top-right-radius: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-right-radius: 0;
}
}
...
@@ -52,19 +54,22 @@
...
@@ -52,19 +54,22 @@
&:not(:first-child) {
&:not(:first-child) {
margin-left: -1px;
margin-left: -1px;
input,
.field-text__
input,
select {
.field-select__
select {
border-top-left-radius: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-bottom-left-radius: 0;
}
}
}
}
}
}
* {
.field-text__input,
.field-select__select,
.btn {
position: relative;
position: relative;
&:focus {
z-index: 1;
z-index: 1;
&:not(:focus) {
z-index: 0;
}
}
}
}
}
}
src/blocks/fields-group/fields-group__item--dropdown.less
0 → 100644
View file @
020d88ad
@import "../../less/variables.less"; // только для удобства обращения к переменным
@import "../../less/mixins/mixins.less"; // только для удобства обращения к примесям
.fields-group {
&__item {
&--dropdown {
&:not(:last-child) {
.btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
&:not(:first-child) {
margin-left: -1px;
.btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
}
}
}
src/blocks_library.html
View file @
020d88ad
...
@@ -641,8 +641,24 @@
...
@@ -641,8 +641,24 @@
<label
class=
"field-text fields-group__item"
>
<label
class=
"field-text fields-group__item"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
</label>
</label>
</div>
<div
class=
"fields-group"
>
<label
class=
"field-text fields-group__item"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
</label>
<span
class=
"fields-group__item fields-group__item--addon fields-group__item--text"
>
<span
class=
"fields-group__item fields-group__item--addon fields-group__item--text"
>
какой-то текст
.00
</span>
</div>
<div
class=
"fields-group"
>
<span
class=
"fields-group__item fields-group__item--addon fields-group__item--text"
>
$
</span>
<label
class=
"field-text fields-group__item"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
</label>
<span
class=
"fields-group__item fields-group__item--addon fields-group__item--text"
>
.00
</span>
</span>
</div>
</div>
<div
class=
"fields-group"
>
<div
class=
"fields-group"
>
...
@@ -655,8 +671,85 @@
...
@@ -655,8 +671,85 @@
<button
class=
"btn fields-group__item fields-group__item--addon"
>
Отправить
</button>
<button
class=
"btn fields-group__item fields-group__item--addon"
>
Отправить
</button>
<button
class=
"btn fields-group__item fields-group__item--addon"
>
Отменить
</button>
<button
class=
"btn fields-group__item fields-group__item--addon"
>
Отменить
</button>
</div>
</div>
<div
class=
"field-actions"
>
<div
class=
"fields-group"
>
<button
class=
"btn"
>
Отправить
</button>
<label
class=
"field-text fields-group__item"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
</label>
<span
role=
"presentation"
class=
"dropdown fields-group__item--dropdown"
>
<button
class=
"dropdown__toggler btn"
type=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Выпадение от пр. края
</button>
<ul
class=
"dropdown__menu dropdown__menu--right"
>
<li><a
href=
"#"
>
Пункт списка (выпадает
<code>
ul
</code>
)
</a></li>
<li><a
href=
""
>
Пункт меню весьма длинный
</a></li>
<li><a
href=
""
>
Второй пункт
</a></li>
</ul>
</span>
</div>
<div
class=
"fields-group"
>
<label
class=
"field-text fields-group__item"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
</label>
<span
role=
"presentation"
class=
"dropdown fields-group__item--dropdown"
>
<button
class=
"dropdown__toggler btn"
type=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Выпадение
</button>
<ul
class=
"dropdown__menu"
>
<li><a
href=
"#"
>
Пункт списка (выпадает
<code>
ul
</code>
)
</a></li>
<li><a
href=
""
>
Пункт меню весьма длинный
</a></li>
<li><a
href=
""
>
Второй пункт
</a></li>
</ul>
</span>
<span
role=
"presentation"
class=
"dropdown fields-group__item--dropdown"
>
<button
class=
"dropdown__toggler btn"
type=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Выпадение от пр. края
</button>
<ul
class=
"dropdown__menu dropdown__menu--right"
>
<li><a
href=
"#"
>
Пункт списка (выпадает
<code>
ul
</code>
)
</a></li>
<li><a
href=
""
>
Пункт меню весьма длинный
</a></li>
<li><a
href=
""
>
Второй пункт
</a></li>
</ul>
</span>
</div>
<div
class=
"fields-group"
>
<span
role=
"presentation"
class=
"dropdown fields-group__item--dropdown"
>
<button
class=
"dropdown__toggler btn"
type=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Выпадение
</button>
<ul
class=
"dropdown__menu"
>
<li><a
href=
"#"
>
Пункт списка (выпадает
<code>
ul
</code>
)
</a></li>
<li><a
href=
""
>
Пункт меню весьма длинный
</a></li>
<li><a
href=
""
>
Второй пункт
</a></li>
</ul>
</span>
<label
class=
"field-text fields-group__item"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
</label>
</div>
<div
class=
"fields-group"
>
<span
role=
"presentation"
class=
"dropdown fields-group__item--dropdown"
>
<button
class=
"dropdown__toggler btn"
type=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Выпадение
</button>
<ul
class=
"dropdown__menu"
>
<li><a
href=
"#"
>
Пункт списка (выпадает
<code>
ul
</code>
)
</a></li>
<li><a
href=
""
>
Пункт меню весьма длинный
</a></li>
<li><a
href=
""
>
Второй пункт
</a></li>
</ul>
</span>
<label
class=
"field-text fields-group__item"
>
<input
class=
"field-text__input"
type=
"text"
placeholder=
"input[type=text]"
>
</label>
<span
role=
"presentation"
class=
"dropdown fields-group__item--dropdown"
>
<button
class=
"dropdown__toggler btn"
type=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
Выпадение от пр. края
</button>
<ul
class=
"dropdown__menu dropdown__menu--right"
>
<li><a
href=
"#"
>
Пункт списка (выпадает
<code>
ul
</code>
)
</a></li>
<li><a
href=
""
>
Пункт меню весьма длинный
</a></li>
<li><a
href=
""
>
Второй пункт
</a></li>
</ul>
</span>
</div>
</div>
</fieldset>
</fieldset>
</form>
</form>
...
...
src/less/mixins/btn-mixins.less
View file @
020d88ad
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
.btn-color--active(@color: @text-color; @background: @gray-lighter; @border: @gray-lighter) {
.btn-color--active(@color: @text-color; @background: @gray-lighter; @border: @gray-lighter) {
color: @color;
color: @color;
background-color: darken(@background, 15%);
background-color: darken(@background, 15%);
border-color: darken(@border,
50
%);
border-color: darken(@border,
17
%);
}
}
...
...
src/less/style.less
View file @
020d88ad
...
@@ -24,5 +24,6 @@
...
@@ -24,5 +24,6 @@
@import "./src/blocks/field-toggler/field-toggler.less";
@import "./src/blocks/field-toggler/field-toggler.less";
@import "./src/blocks/dropdown/dropdown.less";
@import "./src/blocks/dropdown/dropdown.less";
@import "./src/blocks/fields-group/fields-group.less";
@import "./src/blocks/fields-group/fields-group.less";
@import "./src/blocks/fields-group/fields-group__item--dropdown.less";
@import "./src/blocks/btn-group/btn-group.less";
@import "./src/blocks/btn-group/btn-group.less";
@import "./src/blocks/checked-btn/checked-btn.less";
@import "./src/blocks/checked-btn/checked-btn.less";
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