mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #10231 - paulrouget:selectionColor, r=mbrubeck
Make selection blue instead of orange PR https://github.com/servo/servo/pull/10176 add a background color for selected text. It uses a builtin color until `::selection` is supported. ~~Orange makes sense for Linux. Let's make it blue for windows and mac.~~ See https://github.com/servo/servo/pull/10231#issuecomment-202335065 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10231) <!-- Reviewable:end -->
This commit is contained in:
commit
cf4fa0a9f4
3 changed files with 6 additions and 6 deletions
|
@ -105,8 +105,8 @@ impl<'a> DisplayListBuildState<'a> {
|
|||
const INSERTION_POINT_LOGICAL_WIDTH: Au = Au(1 * AU_PER_PX);
|
||||
|
||||
// Colors for selected text. TODO (#8077): Use the ::selection pseudo-element to set these.
|
||||
const SELECTION_FOREGROUND_COLOR: RGBA = RGBA { red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0 };
|
||||
const SELECTION_BACKGROUND_COLOR: RGBA = RGBA { red: 1.0, green: 0.5, blue: 0.0, alpha: 1.0 };
|
||||
const SELECTION_FOREGROUND_COLOR: RGBA = RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 };
|
||||
const SELECTION_BACKGROUND_COLOR: RGBA = RGBA { red: 0.69, green: 0.84, blue: 1.0, alpha: 1.0 };
|
||||
|
||||
// TODO(gw): The transforms spec says that perspective length must
|
||||
// be positive. However, there is some confusion between the spec
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
padding: 0;
|
||||
}
|
||||
::selection {
|
||||
color: white;
|
||||
background: rgba(255, 127, 0, 1.0);
|
||||
color: black;
|
||||
background: rgba(176, 214, 255, 1.0);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<style>
|
||||
span {
|
||||
font: 16px sans-serif;
|
||||
color: white;
|
||||
background: rgba(255, 128, 0, 1.0);
|
||||
color: black;
|
||||
background: rgba(176, 214, 255, 1.0);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue