Skip to content

Commit 5a742c1

Browse files
authored
Merge pull request #568 from canjs/new-copy-run-buttons
New Copy & Run button styles implementation
2 parents 5543af3 + 442017a commit 5a742c1

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

make-example.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ var siteConfig = {
2222
},
2323
dependencies: {
2424
"bit-docs-html-canjs": __dirname,
25-
"bit-docs-prettify": "^0.1.0",
26-
"bit-docs-html-highlight-line": "^0.2.2",
25+
"bit-docs-prettify": "^0.3.0",
26+
"bit-docs-html-highlight-line": "^0.5.3",
2727
//TODO: This should not be include here and should only be included in package.json.
2828
// we get an error without this, here, though
2929
"steal-stache": "^4.0.1",
3030
"steal-conditional": "^0.3.6",
31-
"bit-docs-html-codepen-link": "^1.0.0",
31+
"bit-docs-html-codepen-link": "^2.0.0",
3232
"bit-docs-html-toc": "^1.1.1"
3333
},
3434
staticDist: [

static/canjs.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222
@import "screenshots.less";
2323
@import "loading-bar.less";
2424
@import "search.less";
25+
@import "prism.less";

static/prism.less

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.body {
2+
div.code-toolbar {
3+
line-height: 0;
4+
> .toolbar {
5+
line-height: 0;
6+
top: 1px;
7+
right: 1px;
8+
9+
> .toolbar-item {
10+
line-height: 0;
11+
}
12+
}
13+
@media (hover: none) {
14+
> .toolbar {
15+
opacity: 1;
16+
}
17+
}
18+
19+
}
20+
div.code-toolbar {
21+
.toolbar a,
22+
.toolbar button,
23+
.toolbar span {
24+
background: #eee;
25+
background: rgba(238, 238, 238, 1);
26+
color: #858585;
27+
padding: .26em 2.25em;
28+
box-shadow: none;
29+
border-radius: 0;
30+
cursor: pointer;
31+
@media(hover: hover) {
32+
&:hover {
33+
background: rgba(238, 238, 238, .6);
34+
color: #4078c0;
35+
}
36+
}
37+
}
38+
}
39+
40+
pre code .collapse.collapsed {
41+
padding: calc(~"0.29em -" 1px) 0;
42+
}
43+
}

0 commit comments

Comments
 (0)