Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #5743 from josiah-keller/master
Browse files Browse the repository at this point in the history
Fix findbar background on sites with a translucent theme color

Thanks @josiah-keller !

cc @bbondy
  • Loading branch information
bradleyrichter committed Nov 20, 2016
2 parents e1201a6 + f194667 commit 33cbd18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/components/findbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,16 @@ class FindBar extends ImmutableComponent {

const backgroundColor = this.backgroundColor
let findBarStyle = {}
let findBarTextStyle = {}

if (backgroundColor) {
findBarStyle = {
background: backgroundColor,
color: this.textColor
}
findBarTextStyle = {
color: this.textColor
}
}

return <div className='findBar' style={findBarStyle} onBlur={this.onBlur}>
Expand Down Expand Up @@ -236,10 +240,10 @@ class FindBar extends ImmutableComponent {
id='caseSensitivityCheckbox'
checkedOn={this.isCaseSensitive}
onClick={this.onCaseSensitivityChange} />
<label htmlFor='caseSensitivityCheckbox' data-l10n-id='caseSensitivity' style={findBarStyle} />
<label htmlFor='caseSensitivityCheckbox' data-l10n-id='caseSensitivity' style={findBarTextStyle} />
</div>
<span className='findButton closeButton'
style={findBarStyle}
style={findBarTextStyle}
onClick={this.props.onFindHide}>+</span>
</div>
}
Expand Down
2 changes: 2 additions & 0 deletions less/findbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

label {
color: @mediumGray;
-webkit-user-select: none;
}

span.findButton {
Expand All @@ -48,6 +49,7 @@
margin-right: 0;
opacity: 0.5;
transform: rotate(45deg);
-webkit-user-select: none;
}

.searchContainer {
Expand Down

0 comments on commit 33cbd18

Please sign in to comment.