Skip to content

Commit

Permalink
Merge pull request #27137 from ZhenjaHorbach/fix/money-text-in-wallet…
Browse files Browse the repository at this point in the history
…-badge-is-not-center-vertically
  • Loading branch information
thienlnam authored Sep 18, 2023
2 parents 4d97719 + 8f6dd92 commit 099fac6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import textUnderline from './utilities/textUnderline';

// touchCallout is an iOS safari only property that controls the display of the callout information when you touch and hold a target
const touchCalloutNone = Browser.isMobileSafari() ? {WebkitTouchCallout: 'none'} : {};
// to prevent vertical text offset in Safari for badges, new lineHeight values have been added
const lineHeightBadge = Browser.isSafari() ? {lineHeight: variables.lineHeightXSmall} : {lineHeight: variables.lineHeightNormal};

const picker = (theme) => ({
backgroundColor: theme.transparent,
Expand Down Expand Up @@ -758,7 +760,7 @@ const styles = (theme) => ({
badgeText: {
color: theme.text,
fontSize: variables.fontSizeSmall,
lineHeight: variables.lineHeightNormal,
...lineHeightBadge,
...whiteSpace.noWrap,
},

Expand Down
1 change: 1 addition & 0 deletions src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default {
optionRowHeightCompact: 52,
optionsListSectionHeaderHeight: getValueUsingPixelRatio(32, 38),
overlayOpacity: 0.6,
lineHeightXSmall: getValueUsingPixelRatio(11, 17),
lineHeightSmall: getValueUsingPixelRatio(14, 16),
lineHeightNormal: getValueUsingPixelRatio(16, 21),
lineHeightLarge: getValueUsingPixelRatio(18, 24),
Expand Down

0 comments on commit 099fac6

Please sign in to comment.