mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 10:36:02 +00:00
LibWebView: Highlight CSS and JS in view-source
The colors and categories here could probably be better, but it works. :^)
This commit is contained in:
parent
66c39f3da4
commit
bd6fdbf312
Notes:
github-actions[bot]
2024-09-30 07:54:36 +00:00
Author: https://github.com/AtkinsSJ
Commit: bd6fdbf312
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1513
2 changed files with 135 additions and 17 deletions
|
@ -84,6 +84,8 @@ constexpr inline StringView HTML_HIGHLIGHTER_STYLE = R"~~~(
|
|||
--name-color: orange;
|
||||
--value-color: deepskyblue;
|
||||
--internal-color: darkgrey;
|
||||
--string-color: goldenrod;
|
||||
--error-color: red;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,6 +96,8 @@ constexpr inline StringView HTML_HIGHLIGHTER_STYLE = R"~~~(
|
|||
--name-color: darkorange;
|
||||
--value-color: blue;
|
||||
--internal-color: dimgrey;
|
||||
--string-color: darkgoldenrod;
|
||||
--error-color: darkred;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,6 +122,19 @@ constexpr inline StringView HTML_HIGHLIGHTER_STYLE = R"~~~(
|
|||
.internal {
|
||||
color: var(--internal-color);
|
||||
}
|
||||
.invalid {
|
||||
color: var(--error-color);
|
||||
text-decoration: currentColor wavy underline;
|
||||
}
|
||||
.at-keyword, .function, .keyword, .control-keyword, .url {
|
||||
color: var(--keyword-color);
|
||||
}
|
||||
.number, .hash {
|
||||
color: var(--value-color);
|
||||
}
|
||||
.string {
|
||||
color: var(--string-color);
|
||||
}
|
||||
)~~~"sv;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue