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
55898777
Commit
55898777
authored
Jun 13, 2016
by
Nikolay Gromov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Перенес стилизацию форм и таблиц
parent
980c7d50
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
167 additions
and
194 deletions
+167
-194
field-select.less
src/blocks/field-select/field-select.less
+10
-2
field-text.less
src/blocks/field-text/field-text.less
+9
-0
blocks_library.html
src/blocks_library.html
+7
-4
global-forms.less
src/less/global/global-forms.less
+0
-145
global-scaffolding.less
src/less/global/global-scaffolding.less
+141
-3
global-tables.less
src/less/global/global-tables.less
+0
-38
style.less
src/less/style.less
+0
-2
No files found.
src/blocks/field-select/field-select.less
View file @
55898777
...
...
@@ -16,12 +16,20 @@
&__input-wrap {}
&__select {
background-color: #fff;
border: 1px solid @border-color;
border-radius: @border-radius;
display: inline-block;
vertical-align: middle;
width: 100%;
line-height: @line-height;
height: 2.125em;
padding: @field-padding-top 1.8em @field-padding-bottom @field-padding-horizontal;
appearance: none;
background-image: data-uri('image/svg+xml;charset=UTF-8', './src/blocks/field-select/img_to_bg/select-down.svg');
background-repeat: no-repeat;
background-position: right 0.3em center;
background-size: 1.063em 0.688em;
padding-right: 1.8em;
&[multiple] {
background-image: none;
...
...
@@ -29,7 +37,7 @@
}
&::-ms-expand {
display: none;
display: none;
}
}
...
...
src/blocks/field-text/field-text.less
View file @
55898777
...
...
@@ -17,6 +17,15 @@
&__input-wrap {}
&__input {
background-color: #fff;
border: 1px solid @border-color;
border-radius: @border-radius;
display: inline-block;
vertical-align: middle;
width: 100%;
line-height: @line-height;
height: 2.125em;
padding: @field-padding-top @field-padding-horizontal @field-padding-bottom;
textarea& {
min-height: (@line-height * 2) + @field-padding-top + @field-padding-bottom + .2; // .2 — поправка на бордюр
...
...
src/blocks_library.html
View file @
55898777
...
...
@@ -264,8 +264,13 @@
</div>
</li>
<li
class=
"main-nav__item"
>
<a
href=
""
class=
"main-nav__link"
>
<span
class=
"main-nav__link-text"
>
Контакты
</span>
<a
href=
"https://github.com/nicothin/NTH-start-project"
class=
"main-nav__link"
>
<span
class=
"main-nav__link-text"
>
Реопзиторий
</span>
</a>
</li>
<li
class=
"main-nav__item"
>
<a
href=
"http://nicothin.pro/"
class=
"main-nav__link"
>
<span
class=
"main-nav__link-text"
>
Автор
</span>
</a>
</li>
</ul>
...
...
@@ -1615,8 +1620,6 @@
<h1
class=
"blocks-library__item-title"
>
Формы по умолчанию
</h1>
<p
class=
"alert alert--danger"
>
Формы по умолчанию имеют стилизацию. См. глобальный стилизационный файл для форм.
</p>
<form
action=
""
>
<div
class=
"row"
>
<fieldset
class=
"col-sm-6 col-md-4"
>
...
...
src/less/global/global-forms.less
deleted
100644 → 0
View file @
980c7d50
//------------------------------------------------------------------------------
// Формы
//------------------------------------------------------------------------------
label {
display: inline-block;
}
button {
overflow: visible;
&:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
line-height: inherit;
font-size: inherit;
font-family: inherit;
text-transform: none;
}
button,
html input[type='button'],
input[type='reset'],
input[type='submit'] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
input[type='search'] {
-webkit-appearance: textfield;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
input[type='checkbox'],
input[type='radio'] {
padding: 0;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
height: auto;
}
::placeholder {
color: @text-color--muted;
opacity: 1;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
border: 0;
margin-top: (@line-height / 2);
margin-bottom: (@line-height / 2);
font-size: @font-size--h4;
font-family: @font-family--headings;
font-weight: 700;
line-height: 1.4;
color: currentColor;
}
// Добавочная стилизация по умолчанию
select,
textarea,
input[type='text'],
input[type='password'],
input[type='datetime'],
input[type='datetime-local'],
input[type='date'],
input[type='month'],
input[type='time'],
input[type='week'],
input[type='number'],
input[type='email'],
input[type='url'],
input[type='search'],
input[type='color'],
input[type='tel'] {
background-color: #fff;
border: 1px solid @border-color;
border-radius: @border-radius;
display: inline-block;
vertical-align: middle;
width: 100%;
line-height: @line-height;
height: 2.125em;
padding: @field-padding-top @field-padding-horizontal @field-padding-bottom;
}
textarea,
select[multiple] {
height: auto;
}
input[type='color'] {
max-width: 100px;
}
input[type='range'] {
width: 100%;
}
input[disabled],
input[readonly] {
background-color: @gray-lighter;
}
select,
textarea,
input {
&:focus {
.focus();
}
}
src/less/global/global-scaffolding.less
View file @
55898777
...
...
@@ -4,6 +4,7 @@
//------------------------------------------------------------------------------
// Базовая стилизация. Одновременно и аналог CSS-normalize, и стилизация тегов.
// Общие правила, типографика, формы по умолчанию, таблицы по умолчанию.
//------------------------------------------------------------------------------
...
...
@@ -268,9 +269,9 @@ blockquote {
text-align: right;
color: @gray;
&:before {
content: '— ';
}
//
&:before {
//
content: '— ';
//
}
}
}
...
...
@@ -310,3 +311,140 @@ pre {
white-space: normal;
tab-size: 2;
}
//------------------------------------------------------------------------------
// Формы
//------------------------------------------------------------------------------
label {
display: inline-block;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
line-height: inherit;
font-size: inherit;
font-family: inherit;
text-transform: none;
}
button,
html input[type='button'],
input[type='reset'],
input[type='submit'] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
input[type='search'] {
-webkit-appearance: textfield;
}
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
}
input[type='checkbox'],
input[type='radio'] {
padding: 0;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
height: auto;
}
::placeholder {
color: @text-color--muted;
opacity: 1;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
textarea,
select[multiple] {
height: auto;
}
input[type='color'] {
max-width: 100px;
}
input[type='range'] {
width: 100%;
}
input[disabled],
input[readonly] {
background-color: @gray-lighter;
}
select,
textarea,
input {
&:focus {
.focus();
}
}
//------------------------------------------------------------------------------
// Таблицы
//------------------------------------------------------------------------------
table {
border: 0;
border-collapse: collapse;
width: 100%;
border: 1px solid @border-color;
}
caption {
padding: round(0.6em * (100 / @font-size--small-percent), 2);
text-align: right;
caption-side: bottom;
font-size: @font-size--small-percent;
line-height: 1em;
color: @text-color--muted;
}
td,
th {
vertical-align: top;
border-bottom: 1px solid @border-color;
&:not(:first-child) {
border-left: 1px solid @border-color;
}
}
th {
text-align: left;
padding: 0.6em;
}
td {
padding: 0.6em;
}
src/less/global/global-tables.less
deleted
100644 → 0
View file @
980c7d50
@import './src/less/variables.less'; // только для удобства обращения к переменным
table {
border: 0;
border-collapse: collapse;
width: 100%;
border: 1px solid @border-color;
}
caption {
padding: round(0.6em * (100 / @font-size--small-percent), 2);
text-align: right;
caption-side: bottom;
font-size: @font-size--small-percent;
line-height: 1em;
color: @text-color--muted;
}
td,
th {
vertical-align: top;
border-bottom: 1px solid @border-color;
&:not(:first-child) {
border-left: 1px solid @border-color;
}
}
th {
text-align: left;
padding: 0.6em;
}
td {
padding: 0.6em;
}
src/less/style.less
View file @
55898777
...
...
@@ -8,8 +8,6 @@
@import './src/less/global/global-scaffolding.less';
@import './src/less/global/global-print.less';
@import './src/less/global/global-grid.less';
@import './src/less/global/global-forms.less';
@import './src/less/global/global-tables.less';
// @import './src/blocks/demo-block/demo-block.less';
@import './src/blocks/page-header/page-header.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