Skip to content

Commit 975e848

Browse files
committed
August 2022 Snapshot 2
1 parent 0ca9c18 commit 975e848

File tree

7 files changed

+97
-22
lines changed

7 files changed

+97
-22
lines changed

css/base.css

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/base.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/cwd_utilities.css

Lines changed: 37 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/cwd_utilities.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/cwd_experimental.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function autoTOC(origin_target,toc_target) {
112112
function codeCopySetup(selectors) {
113113

114114
jQuery(document).ready(function($) {
115-
115+
116116
$(selectors).addClass('code-copy');
117117
$('.code-copy').before('<button class="button-copy enabled"><span class="sr-only">Copy Code</span></button>');
118118

@@ -127,11 +127,17 @@ function codeCopySetup(selectors) {
127127
var markup = $(copy_target).prop('outerHTML').toString();
128128
try {
129129
navigator.clipboard.writeText(markup);
130+
$(this).addClass('success');
130131
}
131132
catch (err) {
132133
console.log('Error while copying to clipboard: ' + err);
134+
$(this).addClass('failure');
133135
}
134136
$(copy_target).addClass('code-copy');
137+
var this_button = $(this);
138+
setTimeout(function() {
139+
$(this_button).removeClass('success failure');
140+
},1000);
135141
});
136142
});
137143
});

sass/base.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3893,6 +3893,11 @@ body > footer .social img, #body-footer .social img {
38933893
.footer-accessibility:before {
38943894
content: '\f29a';
38953895
}
3896+
body > footer .two-col, body > footer .two-col > *, #body-footer .two-col, #body-footer .two-col > *,
3897+
body > footer .three-col, body > footer .three-col > *, #body-footer .three-col, #body-footer .three-col > * {
3898+
margin: 0;
3899+
padding-bottom: 0 !important;
3900+
}
38963901

38973902
#main article .full-window {
38983903
margin: 56px 0;
@@ -4194,11 +4199,6 @@ body > footer .h5, #body-footer .h5 {
41944199
body > footer, #body-footer {
41954200
font-size: 14px;
41964201
}
4197-
body > footer .two-col, body > footer .two-col > *, #body-footer .two-col, #body-footer .two-col > *,
4198-
body > footer .three-col, body > footer .three-col > *, #body-footer .three-col, #body-footer .three-col > * {
4199-
margin: 0;
4200-
padding-bottom: 0 !important;
4201-
}
42024202

42034203
/* Blockquote */
42044204
blockquote.offset {

sass/cwd_utilities.scss

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ button.button-copy {
11911191
color: #000;
11921192
}
11931193
&:active {
1194-
background: #ddd;
1194+
background: #fff;
11951195
border-color: #888;
11961196
color: #666;
11971197
}
@@ -1208,15 +1208,17 @@ button.button-copy {
12081208
& + .code-copy {
12091209
outline: 3px double rgba(0,0,0,0);
12101210
outline-offset: 5px;
1211-
transition: outline-color 0.15s;
1211+
transition: none;
12121212
}
1213-
&:hover + .code-copy, &:focus + .code-copy {
1213+
&:hover + .code-copy {
12141214
outline: 3px double rgba(0,0,0,0.35);
1215-
outline-offset: 5px
1215+
outline-offset: 5px;
1216+
transition: outline-color 0.15s;
12161217
}
12171218
&:active + .code-copy {
12181219
outline: 3px double rgba(0,0,0,0.9);
1219-
outline-offset: 5px
1220+
outline-offset: 5px;
1221+
transition: outline-color 0.15s;
12201222
}
12211223

12221224
&.right {
@@ -1227,4 +1229,39 @@ button.button-copy {
12271229
}
12281230
}
12291231

1232+
&:after {
1233+
font: normal normal normal 14px/1 'Material-Design-Iconic-Font';
1234+
font-size: inherit;
1235+
speak: never;
1236+
text-rendering: auto;
1237+
-webkit-font-smoothing: antialiased;
1238+
-moz-osx-font-smoothing: grayscale;
1239+
content: '';
1240+
color: #fff;
1241+
background: #222222;
1242+
font-size: 16px;
1243+
width: 1.5em;
1244+
height: 1.5em;
1245+
line-height: 1.5;
1246+
text-align: center;
1247+
border-radius: 100%;
1248+
position: absolute;
1249+
transform: translate(-3px, -20px);
1250+
opacity: 0;
1251+
display: none;
1252+
1253+
}
1254+
&.success:after {
1255+
background: #008800;
1256+
content: '\f108';
1257+
opacity: 1;
1258+
display: inline-block;
1259+
}
1260+
&.failure:after {
1261+
background: #cc0000;
1262+
content: '\f1f2';
1263+
opacity: 1;
1264+
display: inline-block;
1265+
}
1266+
12301267
}

0 commit comments

Comments
 (0)