From 1cc3c8ff157b26e12ce083857297d9ec45ab1143 Mon Sep 17 00:00:00 2001 From: lidlanca Date: Sun, 28 Sep 2014 00:37:21 -0400 Subject: [PATCH] Add Styling for Github Code blob + Line numbers --- .../stylesheets/common/base/onebox.scss | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scss index 3e5c596137d..cc6ef241006 100644 --- a/app/assets/stylesheets/common/base/onebox.scss +++ b/app/assets/stylesheets/common/base/onebox.scss @@ -147,3 +147,53 @@ blockquote { border-left: 5px solid darken(scale-color-diff(), 12%); } } + + + +// -- Onebox Github Code Blob -- +pre.onebox code ol.lines li:before { + position: absolute; + display:inline-block; + width:35px; + left: -40px; + background: #F7F7F7; + color:#AFAFAF; + text-align:right; + padding-right:5px; + font-size:12px; + line-height: 1.9em; + content: counter(li-counter); + counter-increment: li-counter; +} + + +pre.onebox code ol{ + margin-left:0px; + line-height:1.5em; +} +pre.onebox code li{ + background-color:#fff; + padding-left:5px; +} + +pre.onebox code ol.lines{ + position:relative; + margin-left: 40px; +} + +pre.onebox code ol.lines li { + list-style-type: none; + padding-left: 5px; + margin-left: 0px; + border-left: 1px solid #CFCFCF; + border-bottom:1px solid #E8E8E8; + min-height: 1.5em; //show empty li lines +} + +pre.onebox code li.selected{ + background-color:#F8EEC7 +} + +pre.onebox code { + white-space: normal; +}