History

lit: view-source float right

Simon Legner committed 1 year ago

Commit 5fdeff71 parent 8d27cd62 files · +18 −6Browse files

Unified · Split

2 files
  1. assets/stylesheets/pages/_lit.scss +11 −6
  2. lib/docs/filters/lit/clean_html.rb +7 −0
assets/stylesheets/pages/_lit.scss+11−6
@@ -1,25 +1,30 @@
1._lit {1._lit {
2 @extend %simple;2 @extend %simple;
3 3
4 h4 { @extend %block-label, %label-blue; }4 h4 {
5 @extend %block-label, %label-blue;
6 }
5 7
8 .view-source {
9 float: right;
10 }
6 .propertyDetails {11 .propertyDetails {
7 padding-left:1.5em12 padding-left: 1.5em;
8 }13 }
9 .heading.property {14 .heading.property {
10 margin-top:2em15 margin-top: 2em;
11 }16 }
12 .heading.property > h4 {17 .heading.property > h4 {
13 font-weight:40018 font-weight: 400;
14 }19 }
15 .newKeyword,20 .newKeyword,
16 .readonlyKeyword,21 .readonlyKeyword,
17 .staticKeyword {22 .staticKeyword {
18 font-style:italic23 font-style: italic;
19 }24 }
20 .functionName,25 .functionName,
21 .propertyName {26 .propertyName {
22 font-weight:70027 font-weight: 700;
23 }28 }
24 aside.litdev-aside {29 aside.litdev-aside {
25 display: flex;30 display: flex;
lib/docs/filters/lit/clean_html.rb+7−0
@@ -64,6 +64,13 @@ module Docs · 63 unmodified lines
64 h.prepend_child(kindtag)64 h.prepend_child(kindtag)
65 end65 end
66 66
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
67 doc74 doc
68 end75 end
69 end76 end