ant-design/site/theme/static/demo.less

195 lines
3.2 KiB
Plaintext
Raw Normal View History

2016-03-01 14:53:32 +08:00
.code-box-expand-trigger {
cursor: pointer;
font-size: 14px;
2017-02-26 15:41:50 +08:00
color: #9199ac;
2016-03-01 14:53:32 +08:00
margin-left: 5px;
opacity: .8;
transition: all .3s ease;
top: -2px;
position: relative;
&-active {
2017-02-26 15:41:50 +08:00
color: #3b4357;
2016-03-01 14:53:32 +08:00
}
}
2016-03-15 17:40:31 +08:00
.code-boxes-col-1-1 {
2016-04-18 13:43:33 +08:00
width: 100%;
2016-03-07 14:31:47 +08:00
}
2016-03-15 17:40:31 +08:00
.code-boxes-col-2-1 {
display: inline-block;
vertical-align: top;
2016-03-07 14:31:47 +08:00
}
2016-02-29 14:08:40 +08:00
.code-box {
2016-11-18 11:18:14 +08:00
border: 1px solid @border-color-split;
2016-11-13 18:58:02 +08:00
border-radius: @border-radius-base;
2016-02-29 14:08:40 +08:00
display: inline-block;
width: 100%;
position: relative;
2017-02-26 15:41:50 +08:00
margin: 0 0 16px;
2016-05-05 16:12:51 +08:00
transition: all 0.2s ease;
2016-02-29 14:08:40 +08:00
}
.code-box:target {
2016-11-18 11:18:14 +08:00
border: 1px solid fade(@primary-color, 70%);
z-index: 10;
2016-02-29 14:08:40 +08:00
}
2016-08-20 20:36:56 +08:00
.code-box {
.code-box-title a,
.code-box-title a:hover {
color: @text-color;
font-size: 14px;
2016-08-20 20:36:56 +08:00
font-weight: 500;
}
a.edit-button {
position: absolute;
right: -16px;
top: 7px;
font-size: 12px;
transform: scale(0.9);
background: #fff;
padding-right: 6px;
}
2016-02-29 14:08:40 +08:00
}
.code-box .code-box-demo {
2016-11-18 11:18:14 +08:00
border-bottom: 1px solid @border-color-split;
2016-02-29 14:08:40 +08:00
padding: 42px 20px 50px;
}
2016-03-08 15:13:59 +08:00
.code-box iframe {
width: 100%;
border: 0;
}
2016-05-27 14:46:46 +08:00
.code-box-meta.markdown {
2016-02-29 14:08:40 +08:00
position: relative;
2016-08-20 20:36:56 +08:00
padding: 17px 16px 15px 20px;
2016-02-29 14:08:40 +08:00
border-radius: 0 0 6px 6px;
transition: background-color 0.4s ease;
width: 100%;
2016-03-28 19:12:51 +08:00
font-size: 12px;
}
2016-03-23 22:36:26 +08:00
.code-box-meta h4,
section.code-box-meta p {
2016-11-01 15:08:31 +08:00
margin: 4px 0;
2017-03-06 14:54:06 +08:00
width: 98%;
2016-02-29 14:08:40 +08:00
}
2016-03-28 19:12:51 +08:00
.code-box-meta blockquote {
margin: 0;
}
2016-02-29 14:08:40 +08:00
.code-box-title {
position: absolute;
top: -14px;
2016-08-20 20:36:56 +08:00
padding: 1px 8px;
margin-left: -8px;
2016-02-29 14:08:40 +08:00
color: #777;
2016-11-13 18:58:02 +08:00
border-radius: @border-radius-base;
2016-08-19 16:11:32 +08:00
border-top-left-radius: 0;
2016-02-29 14:08:40 +08:00
background: #fff;
2016-08-19 16:11:32 +08:00
transition: background-color 0.4s ease;
2016-02-29 14:08:40 +08:00
}
.code-box-meta > p {
font-size: 12px;
margin: 0.5em 0;
padding-right: 25px;
width: 100%;
2016-03-15 17:40:31 +08:00
word-break: break-word;
2016-02-29 14:08:40 +08:00
}
2016-03-25 17:07:00 +08:00
.code-box.expand .code-box-meta {
2016-03-28 14:14:47 +08:00
border-radius: 0;
2016-11-18 11:18:14 +08:00
border-bottom: 1px dashed @border-color-split;
2016-03-25 17:07:00 +08:00
}
2016-02-29 14:08:40 +08:00
.code-box .collapse {
position: absolute;
2017-02-26 15:09:52 +08:00
right: 14px;
bottom: 22px;
2016-02-29 14:08:40 +08:00
cursor: pointer;
2017-02-26 15:09:52 +08:00
width: 16px;
height: 16px;
font-size: 16px;
line-height: 16px;
2016-02-29 14:08:40 +08:00
opacity: 0.5;
text-align: center;
2016-08-20 20:36:56 +08:00
transition: all 0.3s;
2016-02-29 14:08:40 +08:00
color: #999;
background: #fff;
2016-03-15 17:40:31 +08:00
user-select: none;
2016-04-29 13:42:23 +08:00
border-radius: 100%;
2016-02-29 14:08:40 +08:00
}
.code-box.expand .collapse {
2016-11-13 18:58:02 +08:00
color: shade(@primary-color, 20%);
2016-09-29 23:14:19 +08:00
transform: rotate(-180deg);
2016-02-29 14:08:40 +08:00
}
.code-box .collapse:hover {
opacity: 1;
}
2016-03-25 17:07:00 +08:00
.code-box .highlight-wrapper {
2016-09-29 23:14:19 +08:00
display: none;
2016-03-25 17:07:00 +08:00
overflow: auto;
2016-06-02 21:52:48 +08:00
border-radius: 0 0 6px 6px;
2016-03-25 17:07:00 +08:00
}
.code-box .highlight-wrapper-expand {
2016-09-29 23:14:19 +08:00
display: block;
2016-03-25 17:07:00 +08:00
}
2016-02-29 14:08:40 +08:00
.code-box .highlight {
position: relative;
pre {
margin: 0;
padding: 0;
2016-06-02 21:52:48 +08:00
background: #fff;
}
2016-03-25 17:07:00 +08:00
&:not(:first-child) {
2016-11-18 11:18:14 +08:00
border-top: 1px dashed @border-color-split;
2016-03-25 17:07:00 +08:00
}
2016-02-29 14:08:40 +08:00
}
.code-box .code-box-code-copy {
position: absolute;
top: 10px;
2017-02-26 15:09:52 +08:00
right: 12px;
margin: 0 !important;
2017-02-26 15:09:52 +08:00
font-size: 14px;
cursor: pointer;
color: #888;
2017-03-02 15:08:42 +08:00
transition: all .24s;
2017-02-26 15:09:52 +08:00
background: #fff;
width: 20px;
height: 20px;
line-height: 20px;
text-align: center;
border-radius: 20px;
&:hover {
color: @primary-color;
2017-03-02 15:08:42 +08:00
transform: scale(1.2);
}
&.anticon-check {
color: @green-6!important;
font-weight: bold;
2017-02-26 15:09:52 +08:00
}
}
2016-02-29 14:08:40 +08:00
.code-box pre {
margin: 0;
width: auto;
}
.code-box pre code {
border: none;
background: #fff;
2016-03-08 15:13:59 +08:00
}