Skip to content

Commit

Permalink
Auto merge of #10231 - paulrouget:selectionColor, r=mbrubeck
Browse files Browse the repository at this point in the history
Make selection blue instead of orange

PR #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 #10231 (comment)

<!-- 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 -->
  • Loading branch information
bors-servo committed Mar 28, 2016
2 parents db95de6 + 2bbf35f commit cf4fa0a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/layout/display_list_builder.rs
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/wpt/mozilla/tests/css/input_selection_a.html
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions tests/wpt/mozilla/tests/css/input_selection_ref.html
Expand Up @@ -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>
Expand Down

0 comments on commit cf4fa0a

Please sign in to comment.