mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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);
|
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.
|
// 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_FOREGROUND_COLOR: RGBA = RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 };
|
||||||
const SELECTION_BACKGROUND_COLOR: RGBA = RGBA { red: 1.0, green: 0.5, 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
|
// TODO(gw): The transforms spec says that perspective length must
|
||||||
// be positive. However, there is some confusion between the spec
|
// be positive. However, there is some confusion between the spec
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
::selection {
|
::selection {
|
||||||
color: white;
|
color: black;
|
||||||
background: rgba(255, 127, 0, 1.0);
|
background: rgba(176, 214, 255, 1.0);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
<style>
|
<style>
|
||||||
span {
|
span {
|
||||||
font: 16px sans-serif;
|
font: 16px sans-serif;
|
||||||
color: white;
|
color: black;
|
||||||
background: rgba(255, 128, 0, 1.0);
|
background: rgba(176, 214, 255, 1.0);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue