mirror of
https://github.com/golang/go
synced 2024-11-18 13:04:46 -07:00
godoc: don't select line numbers when highlighting source code
CSS3 introduces the user-select property, which you can use to prevent snippets of text from being highlighted. This is also the technique used by Github to avoid highlighting line numbers when highlighting source code. For more information, see: https://developer.mozilla.org/en-US/docs/Web/CSS/user-select https://www.w3.org/TR/1999/WD-css3-userint-19990916#user-select Fixes golang/go#18279 Change-Id: Ia5eb68d5a042d6ee2a1c8e7bbad753a35de5c487 Reviewed-on: https://go-review.googlesource.com/34278 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Chris Broadfoot <cbro@golang.org>
This commit is contained in:
parent
7932c3d4c8
commit
0a14ca4e16
@ -2860,6 +2860,12 @@ pre .selection-comment {
|
||||
pre .ln {
|
||||
color: #999;
|
||||
}
|
||||
.ln {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
body {
|
||||
color: #222;
|
||||
}
|
||||
|
@ -30,6 +30,12 @@ pre .selection-comment {
|
||||
pre .ln {
|
||||
color: #999;
|
||||
}
|
||||
.ln {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
body {
|
||||
color: #222;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user