generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstyles.css
115 lines (98 loc) · 2.35 KB
/
styles.css
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
/*
This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.
If your plugin does not need CSS, delete this file.
*/
/* https://github.com/mgmeyers/obsidian-style-settings */
/* @settings
name: sticky-heading
id: sticky-heading
settings:
-
id: sticky-heading-bg-color
title: container background color
description: background color of the sticky heading container
type: variable-text
default: var(--titlebar-background)
-
id: sticky-heading-shadow-level
title: shadow
type: variable-select
default: none
options:
-
label: medium
value: 0 16px 16px -16px gray
-
label: large
value: 0 16px 16px -10px gray
-
label: none
value: none
-
id: sticky-heading-show-level
title: show heading level prefix
type: variable-select
default: block
options:
-
label: show
value: block
-
label: hide
value: none
*/
body {
--sticky-heading-top-space: calc(-1 * var(--size-4-8));
--sticky-heading-bg-color: var(--titlebar-background);
}
.obsidian-sticky-heading {
position: absolute;
top: 0;
width: 100%;
z-index: 1;
}
.obsidian-sticky-heading.markdown-rendered h1,
.obsidian-sticky-heading.markdown-rendered h2,
.obsidian-sticky-heading.markdown-rendered h3,
.obsidian-sticky-heading.markdown-rendered h4,
.obsidian-sticky-heading.markdown-rendered h5,
.obsidian-sticky-heading.markdown-rendered h6 {
margin: 0;
font-size: 1.2rem;
}
.obsidian-sticky-heading.markdown-rendered h2 {
font-size: 1.1rem;
}
.obsidian-sticky-heading.markdown-rendered h3 {
font-size: 1rem;
}
.obsidian-sticky-heading.markdown-rendered h4 {
font-size: 0.9rem;
}
.obsidian-sticky-heading_inner {
max-width: calc(var(--max-width) + 8px);
width: calc(var(--line-width, var(--file-line-width, 0px)) + 8px);
margin-inline: var(--content-margin, auto) !important;
background-color: var(--sticky-heading-bg-color);
padding: 0 4px;
box-shadow: var(--sticky-heading-shadow-level);
position: relative;
display: flex;
flex-direction: column;
}
.obsidian-sticky-heading_inner > div:first-child {
margin-top: 6px;
}
.obsidian-sticky-heading_inner > div:last-child {
margin-bottom: 6px;
}
.obsidian-sticky-heading_level {
display: var(--sticky-heading-show-level);
position: absolute;
left: -30px;
text-align: right;
font-weight: normal;
color: var(--text-faint);
font-size: 14px;
}