summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorjaqra <48099350+jaqra@users.noreply.github.com>2019-08-28 01:59:05 +0300
committerAntoine GIRARD <sapk@users.noreply.github.com>2019-08-28 00:59:05 +0200
commit245457d4d3403db9081bf00f8849546630ae45af (patch)
tree3cd0fc89633556b4dbc740b52649b99b32707c01 /public
parenta45909be90b6c553d572eb81bd61e445ae379439 (diff)
downloadgitea-245457d4d3403db9081bf00f8849546630ae45af.tar.gz
gitea-245457d4d3403db9081bf00f8849546630ae45af.zip
Move line number to :before attr to hide from search on browser (#8002)
* Move line number to :before attr to hide from search on browser * Use same variable in WriteString Co-Authored-By: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'public')
-rw-r--r--public/css/index.css2
-rw-r--r--public/less/_base.less11
2 files changed, 8 insertions, 5 deletions
diff --git a/public/css/index.css b/public/css/index.css
index 6b906cc4a8..ad1d0313f7 100644
--- a/public/css/index.css
+++ b/public/css/index.css
@@ -216,7 +216,7 @@ footer .ui.left,footer .ui.right{line-height:40px}
.inline-grouped-list>.ui{display:block;margin-top:5px;margin-bottom:10px}
.inline-grouped-list>.ui:first-child{margin-top:1px}
.lines-num{vertical-align:top;text-align:right!important;color:#999;background:#f5f5f5;width:1%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
-.lines-num span{line-height:20px!important;padding:0 10px;cursor:pointer;display:block}
+.lines-num span:before{content:attr(data-line-number);line-height:20px!important;padding:0 10px;cursor:pointer;display:block}
.lines-code,.lines-num{padding:0!important}
.lines-code .hljs,.lines-code ol,.lines-code pre,.lines-num .hljs,.lines-num ol,.lines-num pre{background-color:#fff;margin:0;padding:0!important}
.lines-code .hljs li,.lines-code ol li,.lines-code pre li,.lines-num .hljs li,.lines-num ol li,.lines-num pre li{display:block;width:100%}
diff --git a/public/less/_base.less b/public/less/_base.less
index d961e18c37..487779c137 100644
--- a/public/less/_base.less
+++ b/public/less/_base.less
@@ -920,10 +920,13 @@ footer {
user-select: none;
span {
- line-height: 20px !important;
- padding: 0 10px;
- cursor: pointer;
- display: block;
+ &:before {
+ content: attr(data-line-number);
+ line-height: 20px !important;
+ padding: 0 10px;
+ cursor: pointer;
+ display: block;
+ }
}
}