Skip to content

Commit

Permalink
refactor: remove misleading sub and sup styles
Browse files Browse the repository at this point in the history
textAlignVertical doesn't work relatevely to line, but to containing
block. Those styles gave the false impression that sub and sup where
fully supported, but that will not be the case until React Native has
official support for this.

Vote for the feature here: https://react-native.canny.io/feature-requests/p/support-superscript-and-subscript

Related #259, #76
  • Loading branch information
jsamr committed Jul 20, 2020
1 parent 7c8d26a commit 002b7fb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/HTMLDefaultStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,10 @@ export function generateDefaultTextStyles (baseFontSize = BASE_FONT_SIZE) {
h5: _generateHeadingStyle(baseFontSize, 0.83, 1.67),
h6: _generateHeadingStyle(baseFontSize, 0.67, 2.33),
sub: {
textAlignVertical: 'top',
fontSize: baseFontSize * 0.8,
marginTop: baseFontSize / 2
fontSize: baseFontSize * 0.8
},
sup: {
textAlignVertical: 'top',
fontSize: baseFontSize * 0.8,
marginBottom: baseFontSize / 2
fontSize: baseFontSize * 0.8
},
p: {
marginTop: baseFontSize,
Expand Down

0 comments on commit 002b7fb

Please sign in to comment.