mirror of
https://github.com/danog/sass-site.git
synced 2024-11-27 04:24:50 +01:00
Tweak impl status styling
* Make the font smaller to make them less prominent and help visually associate the callout with the list. * Decrease the top margin to more clearly associate them with their preceding header. * Lighten the callout background when in another callout to make it more visible. * Animate the expand button.
This commit is contained in:
parent
681d63c698
commit
7fd5bd1c7a
@ -328,7 +328,7 @@ module SassHelpers
|
||||
|
||||
if block_given?
|
||||
# Get rid of extra whitespace to avoid more bogus <p> tags.
|
||||
concat(content_tag :div, _render_markdown(_capture {yield}).strip, class: 'sl-c-callout')
|
||||
concat(content_tag :div, _render_markdown(_capture {yield}).strip, class: 'sl-c-callout sl-c-callout--impl-status')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -23,6 +23,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
&--impl-status {
|
||||
font-size: 0.8em;
|
||||
margin-top: -1rem;
|
||||
padding: 0.8rem;
|
||||
|
||||
.sl-c-callout & {
|
||||
background: lighten($sl-color--pale-sky, 53%);
|
||||
}
|
||||
}
|
||||
|
||||
> *:first-child { margin-top: 0; }
|
||||
|
||||
> *:last-child { margin-bottom: 0; }
|
||||
|
@ -63,4 +63,21 @@
|
||||
|
||||
&:first-child { padding-left: 0; }
|
||||
}
|
||||
|
||||
&.impl-status {
|
||||
font-size: 0.8em;
|
||||
margin-top: -1em;
|
||||
|
||||
a {
|
||||
transition: transform 0.1s;
|
||||
border-bottom: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
width: 19px;
|
||||
text-align: center;
|
||||
transform-origin: 8px 11px;
|
||||
|
||||
&.expanded { transform: rotate(90deg); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ $(function() {
|
||||
details.hide();
|
||||
expandLink.click(function() {
|
||||
details.toggle();
|
||||
expandLink.text(expandLink.text() == "▶" ? "▼" : "▶");
|
||||
expandLink.toggleClass("expanded");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user