blob: 54631d6144666eef18fc00b13004ae51d34086d2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
// Name: Comment
// Description: Component to create nested comments
//
// Component: `uk-comment`
//
// Sub-objects: `uk-comment-body`
// `uk-comment-header`
// `uk-comment-title`
// `uk-comment-meta`
// `uk-comment-avatar`
// `uk-comment-list`
//
// Modifier: `uk-comment-primary`
//
// ========================================================================
// Variables
// ========================================================================
$comment-header-margin-bottom: $global-margin !default;
$comment-title-font-size: $global-medium-font-size !default;
$comment-title-line-height: 1.4 !default;
$comment-meta-font-size: $global-small-font-size !default;
$comment-meta-line-height: 1.4 !default;
$comment-meta-color: $global-muted-color !default;
$comment-list-margin-top: $global-large-margin !default;
$comment-list-padding-left: 30px !default;
$comment-list-padding-left-m: 100px !default;
/* ========================================================================
Component: Comment
========================================================================== */
.uk-comment {
@if(mixin-exists(hook-comment)) {@include hook-comment();}
}
/* Sections
========================================================================== */
.uk-comment-body {
overflow-wrap: break-word;
word-wrap: break-word;
@if(mixin-exists(hook-comment-body)) {@include hook-comment-body();}
}
.uk-comment-header {
margin-bottom: $comment-header-margin-bottom;
@if(mixin-exists(hook-comment-header)) {@include hook-comment-header();}
}
/*
* Micro clearfix
*/
.uk-comment-body::before,
.uk-comment-body::after,
.uk-comment-header::before,
.uk-comment-header::after {
content: "";
display: table;
}
.uk-comment-body::after,
.uk-comment-header::after { clear: both; }
/*
* Remove margin from the last-child
*/
.uk-comment-body > :last-child,
.uk-comment-header > :last-child { margin-bottom: 0; }
/* Title
========================================================================== */
.uk-comment-title {
font-size: $comment-title-font-size;
line-height: $comment-title-line-height;
@if(mixin-exists(hook-comment-title)) {@include hook-comment-title();}
}
/* Meta
========================================================================== */
.uk-comment-meta {
font-size: $comment-meta-font-size;
line-height: $comment-meta-line-height;
color: $comment-meta-color;
@if(mixin-exists(hook-comment-meta)) {@include hook-comment-meta();}
}
/* Avatar
========================================================================== */
.uk-comment-avatar {
@if(mixin-exists(hook-comment-avatar)) {@include hook-comment-avatar();}
}
/* List
========================================================================== */
.uk-comment-list {
padding: 0;
list-style: none;
}
/* Adjacent siblings */
.uk-comment-list > :nth-child(n+2) {
margin-top: $comment-list-margin-top;
@if(mixin-exists(hook-comment-list-adjacent)) {@include hook-comment-list-adjacent();}
}
/*
* Sublists
* Note: General sibling selector allows reply block between comment and sublist
*/
.uk-comment-list .uk-comment ~ ul {
margin: $comment-list-margin-top 0 0 0;
padding-left: $comment-list-padding-left;
list-style: none;
@if(mixin-exists(hook-comment-list-sub)) {@include hook-comment-list-sub();}
}
/* Tablet and bigger */
@media (min-width: $breakpoint-medium) {
.uk-comment-list .uk-comment ~ ul { padding-left: $comment-list-padding-left-m; }
}
/* Adjacent siblings */
.uk-comment-list .uk-comment ~ ul > :nth-child(n+2) {
margin-top: $comment-list-margin-top;
@if(mixin-exists(hook-comment-list-sub-adjacent)) {@include hook-comment-list-sub-adjacent();}
}
/* Style modifier
========================================================================== */
.uk-comment-primary {
@if(mixin-exists(hook-comment-primary)) {@include hook-comment-primary();}
}
// Hooks
// ========================================================================
@if(mixin-exists(hook-comment-misc)) {@include hook-comment-misc();}
// @mixin hook-comment(){}
// @mixin hook-comment-body(){}
// @mixin hook-comment-header(){}
// @mixin hook-comment-title(){}
// @mixin hook-comment-meta(){}
// @mixin hook-comment-avatar(){}
// @mixin hook-comment-list-adjacent(){}
// @mixin hook-comment-list-sub(){}
// @mixin hook-comment-list-sub-adjacent(){}
// @mixin hook-comment-primary(){}
// @mixin hook-comment-misc(){}
|