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

Commit

Permalink
Small fixes of buttons on about:certerror and .noScriptInfo
Browse files Browse the repository at this point in the history
Closes #6317

- Removed a div from certerror.js
- Set margin:.2em and font-size:14px to buttons inside .buttons on about:certerror
- Added 5px margin-bottom to .truncate inside .dialogInner of .noScriptInfo

Auditors: @bsclifton @bradleyrichter

Test Plan 1
1. Open https://expired.badssl.com/
2. Make sure the buttons have margins

Test Plan 2
1. Open https://jsfiddle.net/
2. Disable JavaScript with the shield
3. Click the NoScript icon
4. Make sure the text has margin-bottom
  • Loading branch information
Suguru Hirahara committed Dec 20, 2016
1 parent 23c05b3 commit 98217b3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
7 changes: 3 additions & 4 deletions js/about/certerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,9 @@ class CertErrorPage extends React.Component {
<div className='buttons'>
<Button l10nId='certErrorSafety' className='actionButton' onClick={this.onSafety.bind(this)} />
{this.state.url ? (this.state.advanced
? (<div>
<Button l10nId='certErrorButtonText' className='subtleButton' onClick={this.onAccept.bind(this)} />
<Button l10nId='certErrorShowCertificate' className='subtleButton' onClick={this.onDetail.bind(this)} />
</div>)
? (<Button l10nId='certErrorButtonText' className='subtleButton' onClick={this.onAccept.bind(this)} />) : null) : null}
{this.state.url ? (this.state.advanced
? (<Button l10nId='certErrorShowCertificate' className='subtleButton' onClick={this.onDetail.bind(this)} />)
: <Button l10nId='certErrorAdvanced' className='subtleButton' onClick={this.onAdvanced.bind(this)} />) : null}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion js/components/noScriptInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class NoScriptInfo extends ImmutableComponent {
site: this.props.frameProps.get('location') || 'this page'
}
return <Dialog onHide={this.props.onHide} className='noScriptInfo' isClickDismiss>
<div>
<div className='dialogInner'>
<div className='truncate' data-l10n-args={JSON.stringify(l10nArgs)}
data-l10n-id={this.numberBlocked === 1 ? 'scriptBlocked' : 'scriptsBlocked'} />
{this.buttons}
Expand Down
12 changes: 12 additions & 0 deletions less/about/error.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
padding-bottom: 1rem;
}

.buttons {
display: flex;
flex-flow: row wrap;
position: relative;
right: .2em; // cancel margin: .2em to align .buttons and .certErrorText

> .browserButton {
margin: .2em;
font-size: 14px;
}
}

.errorLogo {
margin-bottom: 2rem;

Expand Down
6 changes: 5 additions & 1 deletion less/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -515,14 +515,18 @@ select {
}

.noScriptInfo {
>div {
.dialogInner {
.flyoutDialog;
right: 20px;
width: auto;
max-width: 350px;
text-align: center;
font-size: 15px;
cursor: default;

.truncate {
margin-bottom: 5px;
}
}
}

Expand Down

0 comments on commit 98217b3

Please sign in to comment.