-
Notifications
You must be signed in to change notification settings - Fork 974
Increase pinned tabs width #10533
Increase pinned tabs width #10533
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ const styles = StyleSheet.create({ | |
boxSizing: 'border-box', | ||
color: '#5a5a5a', | ||
display: 'flex', | ||
height: globalStyles.spacing.tabHeight, | ||
marginTop: '0', | ||
transition: `transform 200ms ease, ${globalStyles.transition.tabBackgroundTransition}`, | ||
left: '0', | ||
|
@@ -29,6 +28,10 @@ const styles = StyleSheet.create({ | |
padding: globalStyles.spacing.defaultTabPadding, | ||
position: 'relative', | ||
|
||
// globalStyles.spacing.tabHeight has been set to globalStyles.spacing.tabsToolbarHeight, | ||
// which is 1px extra due to the border-top of .tabsToolbar | ||
height: '-webkit-fill-available', | ||
|
||
':hover': { | ||
background: 'linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(250, 250, 250, 0.4))' | ||
} | ||
|
@@ -68,12 +71,6 @@ const styles = StyleSheet.create({ | |
overflow: 'hidden' | ||
}, | ||
|
||
// Add extra space for pages that have no icon | ||
// such as about:blank and about:newtab | ||
noFavicon: { | ||
padding: '0 6px' | ||
}, | ||
|
||
alternativePlayIndicator: { | ||
borderTop: '2px solid lightskyblue' | ||
}, | ||
|
@@ -83,24 +80,28 @@ const styles = StyleSheet.create({ | |
alignItems: 'center', | ||
display: 'flex', | ||
flex: '1', | ||
minWidth: '0', // @see https://bugzilla.mozilla.org/show_bug.cgi?id=1108514#c5 | ||
|
||
// @see https://bugzilla.mozilla.org/show_bug.cgi?id=1108514#c5 | ||
minWidth: '0', | ||
|
||
// prevent the icons wrapper from being the target of mouse events. | ||
pointerEvents: 'none' | ||
}, | ||
|
||
isPinned: { | ||
paddingLeft: globalStyles.spacing.defaultIconPadding, | ||
paddingRight: globalStyles.spacing.defaultIconPadding | ||
padding: 0, | ||
width: `calc(${globalStyles.spacing.tabsToolbarHeight} * 1.1)`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this seems fragile to me. What if at a given point we decide to update tabs toolbar height? pinned tabs sizing are also are not used anywhere else so I won't mind having the size explicitly described here. |
||
justifyContent: 'center' | ||
}, | ||
|
||
active: { | ||
background: `rgba(255, 255, 255, 1.0)`, | ||
height: globalStyles.spacing.tabHeight, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redundant |
||
marginTop: '0', | ||
borderWidth: '0 1px 0 0', | ||
borderStyle: 'solid', | ||
borderColor: '#bbb', | ||
color: '#000', | ||
|
||
':hover': { | ||
background: `linear-gradient(to bottom, #fff, ${globalStyles.color.chromePrimary})` | ||
} | ||
|
@@ -138,13 +139,19 @@ const styles = StyleSheet.create({ | |
fontSize: globalStyles.fontSize.tabIcon, | ||
backgroundPosition: 'center', | ||
backgroundRepeat: 'no-repeat', | ||
display: 'flex', | ||
alignSelf: 'center', | ||
position: 'relative', | ||
textAlign: 'center', | ||
justifyContent: 'center', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need those. |
||
paddingLeft: globalStyles.spacing.defaultIconPadding, | ||
paddingRight: globalStyles.spacing.defaultIconPadding | ||
}, | ||
|
||
icon_audio: { | ||
color: globalStyles.color.highlightBlue, | ||
|
||
// 16px | ||
fontSize: `calc(${globalStyles.fontSize.tabIcon} + 2px)`, | ||
|
||
// equal spacing around audio icon (favicon and tabTitle) | ||
padding: globalStyles.spacing.defaultTabPadding, | ||
paddingRight: '0 !important' | ||
} | ||
}) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
const React = require('react') | ||
const {StyleSheet, css} = require('aphrodite/no-important') | ||
const {css} = require('aphrodite/no-important') | ||
const Immutable = require('immutable') | ||
|
||
// Components | ||
|
@@ -61,17 +61,11 @@ class AudioTabIcon extends React.Component { | |
|
||
render () { | ||
return <TabIcon | ||
className={css(tabStyles.icon, styles.audioIcon)} | ||
className={css(tabStyles.icon, tabStyles.icon_audio)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specifying a style in each file will create style inconsistency quite easily. |
||
symbol={this.audioIcon} | ||
onClick={this.toggleMute} /> | ||
onClick={this.toggleMute} | ||
/> | ||
} | ||
} | ||
|
||
module.exports = ReduxComponent.connect(AudioTabIcon) | ||
|
||
const styles = StyleSheet.create({ | ||
audioIcon: { | ||
color: globalStyles.color.highlightBlue, | ||
fontSize: '16px' | ||
} | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,14 +17,13 @@ const globalStyles = require('../../styles/global') | |
class TabIcon extends ImmutableComponent { | ||
render () { | ||
const styles = StyleSheet.create({ | ||
icon: { | ||
tabIcon: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replaced as it is confusing on debugging (we already have |
||
fontSize: this.props.symbolContent ? '8px' : 'inherit', | ||
display: 'flex', | ||
alignSelf: 'center', | ||
width: globalStyles.spacing.iconSize, | ||
height: globalStyles.spacing.iconSize, | ||
alignItems: 'center', | ||
justifyContent: this.props.symbolContent ? 'flex-end' : 'left', | ||
justifyContent: this.props.symbolContent ? 'flex-end' : 'center', | ||
fontWeight: this.props.symbolContent ? 'bold' : 'normal', | ||
color: this.props.symbolContent ? globalStyles.color.black100 : 'inherit' | ||
} | ||
|
@@ -51,7 +50,7 @@ class TabIcon extends ImmutableComponent { | |
? <span | ||
className={cx({ | ||
[this.props.symbol]: true, | ||
[css(styles.icon)]: true | ||
[css(styles.tabIcon)]: true | ||
})} | ||
data-test-id={this.props['data-test-id']} | ||
data-test2-id={this.props['data-test2-id']} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not called anywhere.