Config block styling & text selection fixes (#14447)

This commit is contained in:
Franck Nijhof 2020-09-10 00:38:31 +02:00 committed by GitHub
parent 18076d796a
commit 730ed9c922
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View File

@ -61,7 +61,8 @@ module Jekyll
result << vars.map do |key, attr|
markup = Array.new
markup << "<div class='config-vars-item'><div class='config-vars-label'><a name='#{slug(key)}' class='title-link' href='\##{slug(key)}'></a> <span class='config-vars-label-name'>#{key}</span>"
# There are spaces around the "{key}", to improve double-click selection in Chrome.
markup << "<div class='config-vars-item'><div class='config-vars-label'><a name='#{slug(key)}' class='title-link' href='\##{slug(key)}'></a> <span class='config-vars-label-name'> #{key} </span>"
if attr.key? 'type'
@ -115,7 +116,7 @@ module Jekyll
shortDefaultValue = ", default: " + shortDefaultValue
end
markup << "<span class='config-vars-required'>#{startSymbol}<span class='#{attr['required'].to_s}'>#{required_value(attr['required'])}</span>#{shortDefaultValue}#{endSymbol}</span>"
markup << "<span class='config-vars-required'>#{startSymbol}<span class='#{attr['required'].to_s}'>#{required_value(attr['required'])}</span><span class='default'>#{shortDefaultValue}</span>#{endSymbol}</span>"
end
markup << "</div><div class='config-vars-description-and-children'>"

View File

@ -500,17 +500,13 @@ div.config-vars {
}
.nested .config-vars-item:last-child {
border: none
border: none;
}
.config-vars-label {
padding-bottom: 4px;
position: relative;
> span {
padding-right: 4px;
}
&:hover a.title-link::before {
position: absolute;
top: 5px;
@ -525,17 +521,17 @@ div.config-vars {
.config-vars-label-name {
font-weight: bold;
font-size: 16px;
font-size: 16px;
color: #222222bd;
}
.config-vars-type {
color :#8792a2;
color: #8792a2;
font-size: 13px;
}
.config-vars-required {
color :#8792a2;
color: #8792a2;
font-size: 13px;
text-transform: lowercase;
@ -544,6 +540,10 @@ div.config-vars {
text-transform: uppercase;
font-size: 11px;
}
.default {
text-transform: None;
}
}
.config-vars-description-and-children {