Skip to content

Commit 5fdeff7

Browse files
committed
lit: view-source float right
1 parent 8d27cd6 commit 5fdeff7

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

assets/stylesheets/pages/_lit.scss

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
._lit {
22
@extend %simple;
33

4-
h4 { @extend %block-label, %label-blue; }
4+
h4 {
5+
@extend %block-label, %label-blue;
6+
}
57

8+
.view-source {
9+
float: right;
10+
}
611
.propertyDetails {
7-
padding-left:1.5em
12+
padding-left: 1.5em;
813
}
914
.heading.property {
10-
margin-top:2em
15+
margin-top: 2em;
1116
}
1217
.heading.property > h4 {
13-
font-weight:400
18+
font-weight: 400;
1419
}
1520
.newKeyword,
1621
.readonlyKeyword,
1722
.staticKeyword {
18-
font-style:italic
23+
font-style: italic;
1924
}
2025
.functionName,
2126
.propertyName {
22-
font-weight:700
27+
font-weight: 700;
2328
}
2429
aside.litdev-aside {
2530
display: flex;

lib/docs/filters/lit/clean_html.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ def call
6464
h.prepend_child(kindtag)
6565
end
6666

67+
# View source
68+
css('h2 ~ a.viewSourceLink, h3 ~ a.viewSourceLink, h4 ~ a.viewSourceLink').each do |node|
69+
node['class'] = 'view-source'
70+
node.content = 'Source'
71+
node.previous_element << node
72+
end
73+
6774
doc
6875
end
6976
end

0 commit comments

Comments
 (0)