mixin source uses :target for css interaction
This commit is contained in:
parent
feb6549a02
commit
a7559fcdd5
@ -34,21 +34,21 @@ body.reference {
|
||||
margin-top: 1em; } }
|
||||
span.view-source {
|
||||
float: right;
|
||||
margin: 1.25em;
|
||||
margin: 1em;
|
||||
}
|
||||
span.color + span.swatch { margin: 0 3px 3px; border: 1px solid #333333; width: 1em; height: 1em; @include inline-block; }
|
||||
.color-snippet { width: 100px; height: 20px; @include border-radius(3px); }
|
||||
a.help { font-size: 75%; }
|
||||
.mixin-source {
|
||||
pre {
|
||||
@include transition;
|
||||
@include transparent;
|
||||
@include box-sizing(border-box);
|
||||
display: none;
|
||||
overflow-x: auto;
|
||||
width: 100%;
|
||||
padding: $base-rhythm-unit;
|
||||
}
|
||||
pre.shown {
|
||||
pre:target {
|
||||
display: block;
|
||||
@include opaque;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,9 +106,9 @@ header[role="banner"]
|
||||
#search-docs
|
||||
color: #999
|
||||
p
|
||||
margin: 0
|
||||
+columns(3)
|
||||
+omega
|
||||
margin: 0
|
||||
label
|
||||
+float(left)
|
||||
width: columns(1,3) + gutter(3)*.5
|
||||
@ -147,9 +147,6 @@ footer[role="contentinfo"]
|
||||
article
|
||||
text-align: left
|
||||
|
||||
aside[role="sidebar"] + article
|
||||
+prefix(3)
|
||||
|
||||
article
|
||||
> nav
|
||||
border-top: $px2em*1px solid #ccc
|
||||
@ -167,7 +164,7 @@ article
|
||||
|
||||
/* @group OVERRIDES by content
|
||||
|
||||
#content
|
||||
aside[role="sidebar"] + article
|
||||
+columns(9)
|
||||
+omega
|
||||
h1
|
||||
|
@ -4,14 +4,14 @@
|
||||
- mixin_defs.each do |mixin|
|
||||
%span.view-source
|
||||
View Source:
|
||||
%a.view-source{:href=>"#", :onclick => "$('#mixin-#{mixin.name}-source .scss').removeClass('shown');$('#mixin-#{mixin.name}-source .sass').addClass('shown'); return false;"} Sass
|
||||
%a.view-source{:href=>"#mixin-#{mixin.name}-sass"} Sass
|
||||
\|
|
||||
%a.view-source{:href=>"#", :onclick => "$('#mixin-#{mixin.name}-source .sass').removeClass('shown');$('#mixin-#{mixin.name}-source .scss').addClass('shown'); return false;"} SCSS
|
||||
%a.view-source{:href=>"#mixin-#{mixin.name}-scss"} SCSS
|
||||
%h3.mixin{:id=>"mixin-#{mixin.name}"}
|
||||
%a.permalink{:href => "#mixin-#{mixin.name}"}= mixin_signature(mixin)
|
||||
.mixin-source{:id=>"mixin-#{mixin.name}-source"}
|
||||
%pre.sass= mixin.to_sass
|
||||
%pre.scss= mixin.to_scss
|
||||
%pre{:id=>"mixin-#{mixin.name}-sass"}= mixin.to_sass
|
||||
%pre{:id=>"mixin-#{mixin.name}-scss"}= mixin.to_scss
|
||||
|
||||
.source-documentation
|
||||
= format_doc(mixin.comment)
|
||||
|
Loading…
Reference in New Issue
Block a user