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
225a1801
Commit
225a1801
authored
Mar 21, 2017
by
Nikolay Gromov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил ефиду
parent
13bd5c87
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
187 additions
and
94 deletions
+187
-94
package.json
package.json
+2
-1
blocks-demo.html
src/blocks-demo.html
+110
-0
loader.scss
src/blocks/loader/loader.scss
+2
-2
table-responsive--horizontal.less
...blocks/table-responsive/table-responsive--horizontal.less
+0
-40
table-responsive.scss
src/blocks/table-responsive/table-responsive.scss
+0
-0
table--hover.less
src/blocks/table/table--hover.less
+0
-17
table--not-greed.less
src/blocks/table/table--not-greed.less
+0
-11
table--striped.less
src/blocks/table/table--striped.less
+0
-17
table.html
src/blocks/table/table.html
+28
-4
table.js
src/blocks/table/table.js
+0
-0
table.scss
src/blocks/table/table.scss
+44
-0
typo.scss
src/blocks/typo/typo.scss
+1
-2
No files found.
package.json
View file @
225a1801
...
...
@@ -38,7 +38,8 @@
"dropdown"
:
[],
"menu"
:
[],
"label"
:
[],
"loader"
:
[]
"loader"
:
[],
"table"
:
[]
},
"addCssBefore"
:
[
"./src/scss/variables.scss"
,
...
...
src/blocks-demo.html
View file @
225a1801
...
...
@@ -1211,6 +1211,116 @@
</section>
<section
class=
"blocks-library__item"
id=
"table"
data-name=
".table"
>
<h2
class=
"blocks-library__item-title"
>
Таблицы
</h2>
<table
class=
"table"
>
<caption>
Таблица как БЭМ-блок, нет прописанных thead, tbody, tfoot
</caption>
<tbody>
<tr>
<th>
Имя
</th>
<th>
Фамилия
</th>
<th>
Мыло
</th>
<th>
Статус
</th>
<th>
Политическая ориентация
</th>
</tr>
<tr>
<td>
Иннокентий
</td>
<td>
Барлаухенштицкен-Ламанческий
</td>
<td>
Хозяйственное
</td>
<td>
Администратор
</td>
<td>
«ВСЕГДА!»
</td>
</tr>
<tr>
<td>
Васисуалий
</td>
<td>
Пылепневмомешковыколачивателев
</td>
<td>
Душистое
</td>
<td>
Юзверь
</td>
<td>
Нижняя
</td>
</tr>
</tbody>
</table>
<table
class=
"table"
>
<caption>
Таблица как БЭМ-блок, есть thead, tbody, tfoot и у них есть классы
</caption>
<thead
class=
"table__header"
>
<tr>
<th>
Имя
</th>
<th>
Фамилия
</th>
<th>
Мыло
</th>
<th>
Статус
</th>
<th>
Политическая ориентация
</th>
</tr>
</thead>
<tbody
class=
"table__body"
>
<tr>
<td>
Иннокентий
</td>
<td>
Барлаухенштицкен-Ламанческий
</td>
<td>
Хозяйственное
</td>
<td>
Администратор
</td>
<td>
«ВСЕГДА!»
</td>
</tr>
<tr>
<td>
Васисуалий
</td>
<td>
Пылепневмомешковыколачивателев
</td>
<td>
Душистое
</td>
<td>
Юзверь
</td>
<td>
Нижняя
</td>
</tr>
<tr>
<td>
Ктулху
</td>
<td>
Втанк
</td>
<td>
ktulkhu@ad.ru
</td>
<td>
Патриарх
</td>
<td>
Яизм
</td>
</tr>
</tbody>
<tfoot
class=
"table__footer"
>
<tr>
<td
colspan=
"5"
>
Итого: 18 попугаев, 15 длинных червяков, надувная женщина и украденный из церкви огарок дешевой свечи.
</td>
</tr>
</tfoot>
</table>
<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>
<
table class="table">
</code>
<code>
<
caption>Таблица
<
/caption>
</code>
<code>
<
thead class="table__header">
</code>
<code>
<
tr>
</code>
<code>
<
th>Имя
<
/th>
</code>
<code>
<
th>Фамилия
<
/th>
</code>
<code>
<
/tr>
</code>
<code>
<
/thead>
</code>
<code>
<
tbody class="table__body">
</code>
<code>
<
tr>
</code>
<code>
<
td>Иннокентий
<
/td>
</code>
<code>
<
td>Барлаухенштицкен-Ламанческий
<
/td>
</code>
<code>
<
/tr>
</code>
<code>
<
tr>
</code>
<code>
<
td>Васисуалий
<
/td>
</code>
<code>
<
td>Пылепневмомешковыколачивателев
<
/td>
</code>
<code>
<
/tr>
</code>
<code>
<
tr>
</code>
<code>
<
td>Ктулху
<
/td>
</code>
<code>
<
td>Втанк
<
/td>
</code>
<code>
<
/tr>
</code>
<code>
<
/tbody>
</code>
<code>
<
tfoot class="table__footer">
</code>
<code>
<
tr>
</code>
<code>
<
td colspan="2">Итого:
<
/td>
</code>
<code>
<
/tr>
</code>
<code>
<
/tfoot>
</code>
<code>
<
/table>
</code>
</pre>
</div>
</div>
</section>
</div>
<style>
...
...
src/blocks/loader/loader.scss
View file @
225a1801
...
...
@@ -8,8 +8,8 @@
&
:before
{
content
:
''
;
display
:
block
;
width
:
1
.2
em
;
height
:
1
.2
em
;
width
:
1em
;
height
:
1em
;
border
:
3px
solid
$gray-lightest
;
border-top
:
3px
solid
$gray-lighter
;
border-radius
:
50%
;
...
...
src/blocks/table-responsive/table-responsive--horizontal.less
deleted
100644 → 0
View file @
13bd5c87
// Для импорта в диспетчер подключений: @import './src/blocks/table-responsive/table-responsive--horizontal.less';
@import '../../less/variables.less'; // только для удобства обращения к переменным
//------------------------------------------------------------------------------
// Адаптивные таблицы (требуют наличия атрибутов data-label на тегах td)
//------------------------------------------------------------------------------
.table-responsive {
&--horizontal {
@media (max-width: (@screen-md - 1)) {
tbody {
td {
display: block;
width: 100%;
padding-left: 19rem;
&:before {
width: 18rem;
min-width: 18rem;
padding-right: 1rem;
float: left;
margin-left: -19rem + 0.6rem;
}
&:after {
content: '';
display: table;
clear: both;
}
}
}
}
}
}
src/blocks/table-responsive/table-responsive.
le
ss
→
src/blocks/table-responsive/table-responsive.
sc
ss
View file @
225a1801
File moved
src/blocks/table/table--hover.less
deleted
100644 → 0
View file @
13bd5c87
// Для импорта в диспетчер подключений: @import './src/blocks/table/table--hover.less';
@import '../../less/variables.less'; // только для удобства обращения к переменным
.table {
&--hover {
tbody {
tr:hover {
background-color: @gray-lightest;
}
}
}
}
src/blocks/table/table--not-greed.less
deleted
100644 → 0
View file @
13bd5c87
// Для импорта в диспетчер подключений: @import './src/blocks/table/table--not-greed.less';
@import '../../less/variables.less'; // только для удобства обращения к переменным
.table {
&--not-greed {
width: auto;
}
}
src/blocks/table/table--striped.less
deleted
100644 → 0
View file @
13bd5c87
// Для импорта в диспетчер подключений: @import './src/blocks/table/table--striped.less';
@import '../../less/variables.less'; // только для удобства обращения к переменным
.table {
&--striped {
tbody {
tr:nth-child(2n) {
background-color: @gray-lightest;
}
}
}
}
src/blocks/table/table.html
View file @
225a1801
<!--DEV
Нужно убрать пробел между @-ами:
@ @include('blocks/table/table.html')
<table class="table">
<caption>Таблица</caption>
<thead class="table__header">
<tr>
<th>Имя</th>
<th>Фамилия</th>
</tr>
</thead>
<tbody class="table__body">
<tr>
<td>Иннокентий</td>
<td>Барлаухенштицкен-Ламанческий</td>
</tr>
<tr>
<td>Васисуалий</td>
<td>Пылепневмомешковыколачивателев</td>
</tr>
<tr>
<td>Ктулху</td>
<td>Втанк</td>
</tr>
</tbody>
<tfoot class="table__footer">
<tr>
<td colspan="2">Итого:</td>
</tr>
</tfoot>
</table>
-->
<div
class=
"table"
>
content
</div>
src/blocks/table/table.js
deleted
100644 → 0
View file @
13bd5c87
src/blocks/table/table.
le
ss
→
src/blocks/table/table.
sc
ss
View file @
225a1801
// Для импорта в диспетчер подключений: @import './src/blocks/table/table.less';
@import '../../less/variables.less'; // только для удобства обращения к переменным
// В этом файле должны быть стили только для БЭМ-блока table, его элементов,
// модификаторов, псевдоселекторов, псевдоэлементов, $media-условий...
// Не пишите здесь другие селекторы.
.table
{
border-collapse
:
collapse
;
width
:
100%
;
border: 1px solid @border-color;
border
:
1px
solid
$border-color
;
margin
:
$line-height
0
;
caption
{
padding
: round(0.6em * (100 / @font-size--small-percent), 2)
;
padding
-top
:
0
.4em
;
text-align
:
right
;
caption-side
:
bottom
;
font-size:
@font-size--small-percent
;
font-size
:
$font-size--small
;
line-height
:
1em
;
color:
@
text-color--muted;
color
:
$
text-color--muted
;
}
td
,
th
{
padding
:
$field-padding-vertical
$field-padding-horizontal
;
vertical-align
:
top
;
border-bottom: 1px solid
@
border-color;
border-bottom
:
1px
solid
$
border-color
;
&
:not
(
:first-child
)
{
border-left: 1px solid
@
border-color;
border-left
:
1px
solid
$
border-color
;
}
}
th
{
text-align
:
left
;
padding: 0.6em;
}
td {
padding: 0.6em;
}
&
__header
{
background-color:
@
gray-lightest;
background-color
:
$
gray-lightest
;
}
&
__body
{}
&
__footer
{
background-color: @gray-lightest;
color: @gray;
background-color
:
$gray-lightest
;
}
}
src/blocks/typo/typo.scss
View file @
225a1801
...
...
@@ -112,8 +112,7 @@ dl,
blockquote
,
pre
,
address
,
figure
,
table
{
figure
{
margin-top
:
(
$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