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:
bors-servo 2016-03-28 23:23:25 +05:30
commit cf4fa0a9f4
3 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -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>

View file

@ -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>