@canopycanopycanopy/b-ber-theme-sans 2.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_settings.scss +17 -90
- package/application.scss +11 -75
- package/package.json +3 -3
package/_settings.scss
CHANGED
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
// sass-lint:disable indentation
|
|
2
|
-
|
|
3
|
-
//
|
|
4
|
-
// Variables
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
// Media Queries
|
|
8
|
-
$media-mobile: 'only screen \
|
|
9
|
-
and (min-width: 320px) \
|
|
10
|
-
and (max-width: 680px)' !default;
|
|
11
|
-
$media-tablet: 'only screen \
|
|
12
|
-
and (min-width: 768px) \
|
|
13
|
-
and (min-height: 1024px) \
|
|
14
|
-
and (max-width: 768px) \
|
|
15
|
-
and (max-height: 768px)' !default;
|
|
16
|
-
$media-desktop: 'only screen \
|
|
17
|
-
and (min-width: 960px)' !default;
|
|
18
|
-
$media-wide: 'only screen \
|
|
19
|
-
and (min-width: 1590px)' !default;
|
|
20
|
-
$media-tall: 'only screen \
|
|
21
|
-
and (min-height: 860px) \
|
|
22
|
-
and (min-width: 960px)' !default;
|
|
23
|
-
$mobile-short: 'only screen \
|
|
24
|
-
and (max-height: 860px) \
|
|
25
|
-
and (max-width: 960px)' !default;
|
|
26
|
-
$desktop-short: 'only screen \
|
|
27
|
-
and (max-height: 860px) \
|
|
28
|
-
and (min-width: 960px)' !default;
|
|
29
|
-
|
|
30
1
|
// Colors
|
|
31
2
|
$white: #fff !default;
|
|
32
3
|
$black: #222 !default;
|
|
@@ -37,45 +8,26 @@ $warning: #da4539 !default;
|
|
|
37
8
|
$danger: #cd8d59 !default;
|
|
38
9
|
$success: #5050c5 !default;
|
|
39
10
|
|
|
40
|
-
//
|
|
41
|
-
$
|
|
42
|
-
$
|
|
43
|
-
|
|
11
|
+
// Set `$grey` in case of e-ink readers
|
|
12
|
+
@if $build == 'mobi' {
|
|
13
|
+
$grey: $black;
|
|
14
|
+
}
|
|
44
15
|
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
$
|
|
51
|
-
$
|
|
52
|
-
$font-size-base: 1em !default;
|
|
53
|
-
$line-height-base: 1.3 !default;
|
|
16
|
+
// General text Layout
|
|
17
|
+
// If new paragraphs should be indented, and if so, by how much. The text indent size
|
|
18
|
+
// can be set to a simple relative unit (not calculated based on font size) because
|
|
19
|
+
// it's only applied to paragraph elements, so will remain consistent throughout
|
|
20
|
+
// the document
|
|
21
|
+
$text-indent: true !default;
|
|
22
|
+
$text-indent-size: two-ems(0) !default;
|
|
54
23
|
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
// --- --- ---
|
|
59
|
-
// $font-scale: 'phi' ;// 1:1.618 1.618
|
|
60
|
-
// $font-scale: 'golden' ;// 1:1.618 1.618
|
|
61
|
-
// $font-scale: 'double-octave' ;// 1:4 4
|
|
62
|
-
// $font-scale: 'major-twelfth' ;// 1:3 3
|
|
63
|
-
// $font-scale: 'major-eleventh' ;// 3:8 2.667
|
|
64
|
-
// $font-scale: 'major-tenth' ;// 2:5 2.5
|
|
65
|
-
// $font-scale: 'octave' ;// 1:2 2
|
|
66
|
-
// $font-scale: 'major-seventh' ;// 8:15 1.875
|
|
67
|
-
// $font-scale: 'minor-seventh' ;// 9:16 1.778
|
|
68
|
-
// $font-scale: 'major-sixth' ;// 3:5 1.667
|
|
69
|
-
// $font-scale: 'minor-sixth' ;// 5:8 1.6
|
|
70
|
-
// $font-scale: 'fifth' ;// 2:3 1.5
|
|
71
|
-
// $font-scale: 'augmented-fourth' ;// 1:√2 1.414
|
|
72
|
-
// $font-scale: 'fourth' ;// 3:4 1.333
|
|
73
|
-
// $font-scale: 'major-third' ;// 4:5 1.25
|
|
74
|
-
// $font-scale: 'minor-third' ;// 5:6 1.2
|
|
75
|
-
// $font-scale: 'major-second' ;// 8:9 1.125
|
|
76
|
-
// $font-scale: 'minor-second' ;// 15:16 1.067
|
|
24
|
+
// If paragraphs and header elements should have a margin bottom. Margin bottom size
|
|
25
|
+
// is calculated automatically to retain vertial rhythm
|
|
26
|
+
$vertical-space: false !default;
|
|
77
27
|
|
|
78
|
-
|
|
28
|
+
// Vertical rhythm settings
|
|
29
|
+
$font-size-base: 1.6em !default; // 16px
|
|
30
|
+
$line-height-base: 1.44222 !default; // 20.8px
|
|
79
31
|
|
|
80
32
|
// Font stacks
|
|
81
33
|
$sans: Helvetica, Arial, sans-serif !default;
|
|
@@ -89,28 +41,3 @@ $landscape-image-height: 4 !default;
|
|
|
89
41
|
$square-image-height: 4 !default;
|
|
90
42
|
$portrait-image-height: 5 !default;
|
|
91
43
|
$portrait-image--high-height: 5 !default;
|
|
92
|
-
|
|
93
|
-
// CSS Grid settings for Reader view
|
|
94
|
-
$grid-row-count: 2 !default; // Number of rows
|
|
95
|
-
$grid-column-count: 12 !default; // Number of columns
|
|
96
|
-
$grid-row-gap-percentage: 14 !default; // Height of the gap between rows
|
|
97
|
-
$grid-column-gap-percentage: 3 !default; // Width of the gap between columns (the gutter)
|
|
98
|
-
|
|
99
|
-
// Grid items' size and location. Declaring both start and end properties will
|
|
100
|
-
// result in the following:
|
|
101
|
-
//
|
|
102
|
-
// $grid-column-start: 1;
|
|
103
|
-
// $grid-column-end: 2;
|
|
104
|
-
//
|
|
105
|
-
// 1 / 2
|
|
106
|
-
//
|
|
107
|
-
// If only the start property is required, omit the second by setting it to an
|
|
108
|
-
// empty string:
|
|
109
|
-
//
|
|
110
|
-
// $grid-column-start: 'span 1';
|
|
111
|
-
// $grid-column-end: '';
|
|
112
|
-
//
|
|
113
|
-
// span 1
|
|
114
|
-
//
|
|
115
|
-
$grid-column-start: 'span 4' !default;
|
|
116
|
-
$grid-column-end: '' !default;
|
package/application.scss
CHANGED
|
@@ -1,100 +1,36 @@
|
|
|
1
|
-
// sass-lint:disable mixins-before-declarations
|
|
2
|
-
|
|
3
1
|
// Declare namespaces
|
|
4
2
|
@namespace url('http://www.w3.org/1999/xhtml');
|
|
5
3
|
@namespace epub url('http://www.idpf.org/2007/ops');
|
|
6
4
|
|
|
7
5
|
// Load vendor libs
|
|
8
6
|
// https://github.com/modularscale/modularscale-sass
|
|
9
|
-
@import '~modularscale-sass';
|
|
7
|
+
@import '~modularscale-sass/stylesheets/_modularscale';
|
|
8
|
+
// @import '../../node_modules/modularscale-sass/stylesheets/_modularscale.scss';
|
|
10
9
|
|
|
11
|
-
//
|
|
12
|
-
|
|
10
|
+
// For validation while building on CLI, not used in production
|
|
11
|
+
$build: 'epub' !default;
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
@import 'settings';
|
|
15
14
|
@import '~@canopycanopycanopy/b-ber-theme-serif/mixins';
|
|
16
|
-
@import '~@canopycanopycanopy/b-ber-theme-serif/debug';
|
|
17
15
|
|
|
18
16
|
// for validation while building on CLI, not an actual setting
|
|
19
17
|
$build: 'epub' !default;
|
|
20
18
|
|
|
21
|
-
// Font ratio is set by user, but modular-scale isn't available yet in their
|
|
22
|
-
// settings, so we map to values once the lib has loaded
|
|
23
|
-
$font-scale: 'fifth' !default;
|
|
24
|
-
|
|
25
|
-
$font-ratios: (
|
|
26
|
-
'phi': $phi,
|
|
27
|
-
'golden': $golden,
|
|
28
|
-
'double-octave': $double-octave,
|
|
29
|
-
'major-twelfth': $major-twelfth,
|
|
30
|
-
'major-eleventh': $major-eleventh,
|
|
31
|
-
'major-tenth': $major-tenth,
|
|
32
|
-
'octave': $octave,
|
|
33
|
-
'major-seventh': $major-seventh,
|
|
34
|
-
'minor-seventh': $minor-seventh,
|
|
35
|
-
'major-sixth': $major-sixth,
|
|
36
|
-
'minor-sixth': $minor-sixth,
|
|
37
|
-
'fifth': $fifth,
|
|
38
|
-
'augmented-fourth': $augmented-fourth,
|
|
39
|
-
'fourth': $fourth,
|
|
40
|
-
'major-third': $major-third,
|
|
41
|
-
'minor-third': $minor-third,
|
|
42
|
-
'major-second': $major-second,
|
|
43
|
-
'minor-second': $minor-second,
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
$font-ratio: map-get($font-ratios, $font-scale);
|
|
47
|
-
|
|
48
19
|
// Initialize Modular Scale
|
|
49
20
|
//
|
|
50
21
|
// @demo http://www.modularscale.com/
|
|
51
22
|
// @repo https://github.com/modularscale/modularscale-sass
|
|
52
23
|
$modularscale: (
|
|
53
24
|
base: $font-size-base,
|
|
54
|
-
ratio: $
|
|
25
|
+
ratio: $minor-second,
|
|
55
26
|
);
|
|
56
27
|
|
|
57
|
-
|
|
58
|
-
@import '
|
|
59
|
-
@import '~@canopycanopycanopy/b-ber-theme-serif/layout/layout';
|
|
60
|
-
|
|
61
|
-
// base styles
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
html {
|
|
65
|
-
font-size: 156.25%;
|
|
66
|
-
} // 25px
|
|
67
|
-
|
|
68
|
-
@if $build != 'web' {
|
|
69
|
-
html {
|
|
70
|
-
font-size: 100%;
|
|
71
|
-
} // still 25px
|
|
72
|
-
body {
|
|
73
|
-
padding: 0 one-em(0) * 0.5;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@if $build == 'web' {
|
|
78
|
-
.publication__contents {
|
|
79
|
-
font-size: 80%; // 20px
|
|
80
|
-
}
|
|
81
|
-
@include break('mobile') {
|
|
82
|
-
.publication__contents {
|
|
83
|
-
font-size: 68%; // 17px
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@if $build == 'reader' {
|
|
89
|
-
#layout {
|
|
90
|
-
@include fluid-type($min-width, $max-width, $min-font, $max-font);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
28
|
+
@import 'typography';
|
|
29
|
+
@import 'layout';
|
|
93
30
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
31
|
+
// Set `$grey-0` in case of e-ink readers
|
|
32
|
+
@if $build == 'mobi' {
|
|
33
|
+
$grey-0: $black;
|
|
98
34
|
}
|
|
99
35
|
|
|
100
36
|
// Import overrides specific to the `serif` theme. These can still be overridden
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopycanopycanopy/b-ber-theme-sans",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "A sans theme for b-ber projects",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Triple Canopy <b-ber@canopycanopycanopy.com> (https://triplecanopy.github.io/)",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"clean": "echo OK"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@canopycanopycanopy/b-ber-theme-serif": "
|
|
23
|
+
"@canopycanopycanopy/b-ber-theme-serif": "3.0.2",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
25
|
"modularscale-sass": "^3.0.10"
|
|
26
26
|
},
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"@babel/preset-env": "^7.10.4",
|
|
31
31
|
"browserslist": "^4.17.4"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "1ec8ab9a4030fb59839d347beb04ab7605e3d5dd"
|
|
34
34
|
}
|