From c92827324bdfdbbb40336fdc8eca7a1e2808622c Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Fri, 19 Aug 2016 16:11:32 +0800 Subject: [PATCH] site: update edit button style --- site/theme/static/demo.less | 24 +++++++----------------- site/theme/static/markdown.less | 12 ++++++++++-- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/site/theme/static/demo.less b/site/theme/static/demo.less index 7b7294bb47..c9381a4fe8 100644 --- a/site/theme/static/demo.less +++ b/site/theme/static/demo.less @@ -53,9 +53,12 @@ .code-box:target .code-box-title { background: #fbfbfb; box-shadow: 0 -1.2px 0 #e9e9e9; + margin-left: -16px; + padding-left: 16px; .edit-button { display: inline-block; + margin-right: 8px; } } @@ -107,26 +110,13 @@ section.code-box-meta p { .code-box-title { position: absolute; top: -14px; - padding: 1px 1.1em; + padding: 1px 4px; + margin-left: -4px; color: #777; border-radius: 6px; + border-top-left-radius: 0; background: #fff; - transition: all 0.4s ease; -} - -.code-box-title:before { - font-family: anticon; - content: "\e658"; - font-size: 16px; - vertical-align: middle; - line-height: 22px; - position: relative; - margin-right: 8px; - top: -2px; - color: #ccc; - -webkit-transform: rotate(-45deg); - transform: rotate(-45deg); - display: inline-block; + transition: background-color 0.4s ease; } .code-box-meta > p { diff --git a/site/theme/static/markdown.less b/site/theme/static/markdown.less index c4c2a21369..36318a518e 100644 --- a/site/theme/static/markdown.less +++ b/site/theme/static/markdown.less @@ -169,12 +169,20 @@ cursor: not-allowed; } -.markdown .edit-button { +.markdown a.edit-button { line-height: 12px; display: inline-block; margin-left: 10px; height: 12px; - color: inherit; + + i { + color: #999; + + &:hover { + color: #2db7f5; + } + } + .anticon { display: block; font-size: 14px;