Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNMobile: Remove unneeded/duplicate css #18759

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$floating-toolbar-height: 44;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I checked we only used this one here.


.floatingToolbar {
background-color: $dark-gray-500;
margin: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ $get-caption-background-color: rgba(0, 0, 0, 0.4);
background-color: #0000;
color: #fff;
font-family: $default-regular-font;
min-height: $min-height-paragraph;
text-align: center;
}

Expand Down
6 changes: 1 addition & 5 deletions packages/block-library/src/heading/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Internal dependencies
*/
import HeadingToolbar from './heading-toolbar';
import styles from './editor.scss';

/**
* External dependencies
Expand Down Expand Up @@ -38,10 +37,7 @@ const HeadingEdit = ( {
identifier="content"
tagName={ 'h' + attributes.level }
value={ attributes.content }
style={ {
...style,
minHeight: styles[ 'wp-block-heading' ].minHeight,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why we had that in the first place. I searched the file history, and unfortunately it comes from a big merge. Maybe @Tug knows better if this is safe to change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it comes from this PR (related gb-mobile PR).
From what I understand it was used to fix a bug/inconsistency in Aztec related to the placeholder not being displayed when no content was given. I'm not sure if this has been fixed in Aztec, maybe @marecar3 knows? Otherwise @mchowning might have tested it and made sure that was not an issue before removing it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double-checked and the placeholders are showing up for headings, paragraphs, etc. for me.

} }
style={ style }
onChange={ ( value ) => setAttributes( { content: value } ) }
onMerge={ mergeBlocks }
onSplit={ ( value ) => {
Expand Down
4 changes: 0 additions & 4 deletions packages/block-library/src/heading/editor.native.scss

This file was deleted.

4 changes: 0 additions & 4 deletions packages/block-library/src/heading/style.native.scss

This file was deleted.

4 changes: 0 additions & 4 deletions packages/block-library/src/paragraph/style.native.scss

This file was deleted.

4 changes: 2 additions & 2 deletions packages/editor/src/components/post-title/style.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
.titleContainer {
padding-left: 16;
padding-right: 16;
padding-top: $title-block-padding-top;
padding-bottom: $title-block-padding-bottom;
padding-top: 12;
padding-bottom: 12;
margin-top: 24;
}

Expand Down
7 changes: 1 addition & 6 deletions packages/rich-text/src/component/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,6 @@ export class RichText extends Component {
const record = this.getRecord();
const html = this.getHtmlToRender( record, tagName );

let minHeight = styles.richText.minHeight;
if ( style && style.minHeight ) {
minHeight = style.minHeight;
}

const placeholderStyle = getStylesFromColorScheme( styles.richTextPlaceholder, styles.richTextPlaceholderDark );

const {
Expand Down Expand Up @@ -742,7 +737,7 @@ export class RichText extends Component {
} }
style={ {
...style,
minHeight: Math.max( minHeight, this.state.height ),
minHeight: this.state.height,
} }
text={ { text: html, eventCount: this.lastEventCount, selection } }
placeholder={ this.props.placeholder }
Expand Down
1 change: 0 additions & 1 deletion packages/rich-text/src/component/style.native.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

.richText {
font-family: $default-regular-font;
min-height: $min-height-paragraph;
color: $gray-900;
text-decoration-color: $blue-500;
}
Expand Down