Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Show Saved Replies in Comment Toolbar - #118

Merged
sindresorhus merged 1 commit into
masterfrom
show-saved-replies-button
Mar 31, 2016
Merged

sindresorhus merged 1 commit into
masterfrom
show-saved-replies-button

Conversation

@paulmolluzzo

Copy link
Copy Markdown
Contributor

This fixes #115. Only the Saved Replies button is shown in the comment toolbar now.

Comment thread extension/content.css
display: none;
}
.toolbar-group .js-saved-reply-container {
display: block;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you use !important for consistency?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If you don't need !important shouldn't it be omitted? It's very heavy handed and would make it hard for this extension to be compatible with other extensions. They have to be super selective _and_use !important. It'll even override element styles you add via the inspector when you debug or play with stuff.

Personally I try to avoid using it unless really necessary, but can add it if there's a consensus to do that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@paulmolluzzo I'm actually saying that because of this comment from @sindresorhus: #22 (comment)

I'd prefer to not use !important, but there's a point to using it so if GitHub changes some CSS and our selector weight becomes less than GitHub selector's weight we'd need to change it. If we use !important changes are quite rarely needed. However I think CSS rules from extensions have a higher weight than the page CSS (unless the page CSS uses !important). It would be worth looking into that and removing all !important directives when not needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Am I adding it to all of the styles or just the display:none?

@hkdobrev hkdobrev added the bug label Mar 30, 2016
@paulmolluzzo
paulmolluzzo force-pushed the show-saved-replies-button branch from 57786fc to a1a314d Compare March 30, 2016 18:41
@paulmolluzzo

Copy link
Copy Markdown
Contributor Author

Added !important to the display:none only.

@hkdobrev

Copy link
Copy Markdown
Contributor

@paulmolluzzo Hmm, I think you should either add !important to all or not at all, because it's not working for me at the moment. The display: none !important is overriding the others. I'm OK with not using !important as long it is consistent with the rest of the CSS and it's working.

@sindresorhus What do you think about !important?

@sindresorhus

Copy link
Copy Markdown
Member

!important is safer as no future change on GitHub's side can override it, but it does ruin cascading, so drop it if it's makes something harder, like now.

@paulmolluzzo
paulmolluzzo force-pushed the show-saved-replies-button branch from a1a314d to 5f9f00c Compare March 30, 2016 19:59
@paulmolluzzo

Copy link
Copy Markdown
Contributor Author

OK, took it out and it's working now.

comment-box

@hkdobrev

Copy link
Copy Markdown
Contributor

LGTM :shipit:

Sorry for the back-and-forth!

@paulmolluzzo

Copy link
Copy Markdown
Contributor Author

No problem at all! Sorry I didn't realize putting !important in broke it earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Removing top buttons from comment box removes saved replies button

3 participants