Project

General

Profile

1
// Name:            Article
2
// Description:     Component to create articles
3
//
4
// Component:       `uk-article`
5
//
6
// Sub-objects:     `uk-article-title`
7
//                  `uk-article-meta`
8
//
9
// ========================================================================
10

    
11

    
12
// Variables
13
// ========================================================================
14

    
15
$article-margin-top:                             $global-large-margin !default;
16

    
17
$article-title-font-size:                        $global-xxlarge-font-size !default;
18
$article-title-line-height:                      1.2 !default;
19

    
20
$article-meta-font-size:                         $global-small-font-size !default;
21
$article-meta-line-height:                       1.4 !default;
22
$article-meta-color:                             $global-muted-color !default;
23

    
24

    
25
/* ========================================================================
26
   Component: Article
27
 ========================================================================== */
28

    
29
.uk-article {
30
    @if(mixin-exists(hook-article)) {@include hook-article();}
31
}
32

    
33
/*
34
 * Micro clearfix
35
 */
36

    
37
.uk-article::before,
38
.uk-article::after {
39
    content: "";
40
    display: table;
41
}
42

    
43
.uk-article::after { clear: both; }
44

    
45
/*
46
 * Remove margin from the last-child
47
 */
48

    
49
.uk-article > :last-child { margin-bottom: 0; }
50

    
51

    
52
/* Adjacent sibling
53
 ========================================================================== */
54

    
55
.uk-article + .uk-article {
56
    margin-top: $article-margin-top;
57
    @if(mixin-exists(hook-article-adjacent)) {@include hook-article-adjacent();}
58
}
59

    
60

    
61
/* Title
62
 ========================================================================== */
63

    
64
.uk-article-title {
65
    font-size: $article-title-font-size;
66
    line-height: $article-title-line-height;
67
    @if(mixin-exists(hook-article-title)) {@include hook-article-title();}
68
}
69

    
70

    
71
/* Meta
72
 ========================================================================== */
73

    
74
.uk-article-meta {
75
    font-size: $article-meta-font-size;
76
    line-height: $article-meta-line-height;
77
    color: $article-meta-color;
78
    @if(mixin-exists(hook-article-meta)) {@include hook-article-meta();}
79
}
80

    
81

    
82
// Hooks
83
// ========================================================================
84

    
85
@if(mixin-exists(hook-article-misc)) {@include hook-article-misc();}
86

    
87
// @mixin hook-article(){}
88
// @mixin hook-article-adjacent(){}
89
// @mixin hook-article-title(){}
90
// @mixin hook-article-meta(){}
91
// @mixin hook-article-misc(){}
92

    
93

    
94
// Inverse
95
// ========================================================================
96

    
97
$inverse-article-meta-color:                    $inverse-global-muted-color !default;
98

    
99

    
100

    
101
// @mixin hook-inverse-article-title(){}
102
// @mixin hook-inverse-article-meta(){}
(7-7/66)