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

Fix MOTD underline in Safari #1217

Merged
merged 1 commit into from
Jun 24, 2017
Merged

Fix MOTD underline in Safari #1217

merged 1 commit into from
Jun 24, 2017

Conversation

MaxLeiter
Copy link
Member

before: before

after: after

Basically, safari's user agent CSS applies an underline to tags, which bootstrap already does as well (but bootstrap doesn't use text-decoration so it's not overriden).

#settings abbr {
text-decoration: none;
}

Copy link
Member

Choose a reason for hiding this comment

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

Any reason why not abbr entirely?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, this could go into bootstrap.css, imo.

Copy link
Member

Choose a reason for hiding this comment

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

Wait no, I'd rather not patch Bootstrap any further...

@xPaw xPaw added this to the 2.3.2 milestone Jun 11, 2017
@astorije
Copy link
Member

FYI, this has been fixed in Normalize v4+ with the following:

/**
 * 1. Remove the bottom border in Chrome 57- and Firefox 39-.
 * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
 */

abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

Unfortunately, our version of Bootstrap (v3.2.0) uses Normalize v3.0.1 and even latest Bootstrap (v3.3.7) uses Normalize v3.0.3.
Code above is integrated in Bootstrap v4 alpha (using Normalize v5.0.0, latest being v7.0.0), but I don't think it's anywhere near completion nor a trivial upgrade for us.

I think we should use the code pasted above. It could go into style.css or, like @xPaw says, in bootstrap.css. In the end, if we're using the "official" snippet, I don't care where that much.

@xPaw
Copy link
Member

xPaw commented Jun 12, 2017

@astorije What if we included normalize.css and refactored bootstrap.css out? I believe we only require the grid layout from bootstrap, all the other styles do not seem to go used.

@astorije
Copy link
Member

That's a decent possibility, but way beyond the point of this PR though.
@MaxLeiter needs very few changes so this PR can make it to v2.3.2, and what you are describing could a a bigger refactor in a future minor release IMO.

@MaxLeiter
Copy link
Member Author

Changed to just abbr, as requested by @xPaw on IRC

@astorije
Copy link
Member

Hey @MaxLeiter, I stand by my comment above, I think we should definitely apply what Normalize.css does. @xPaw, you okay with that?

@MaxLeiter
Copy link
Member Author

@astorije well normalize's looks slightly different (although an improvement over the actual bug for sure). Which do you prefer?

underline: none: first

normalizes solution: second

@astorije
Copy link
Member

I get where you're going because in terms of styling, I do prefer underline: none, but if our end-goal is to get rid of Bootstrap and rely on Normalize.css entirely, we should probably follow what they do.

That being said, when we do have Normalize only (i.e. no Bootstrap anymore), nothing prevents us to do this ourselves (though I'm sure we'll have forgotten).
Ultimately I don't have a strong opinion anymore, I'm sure @xPaw will have a wiser opinion than me so I'll let him pick between the two you just showed.

Thanks for your efforts anyway!!

@xPaw
Copy link
Member

xPaw commented Jun 23, 2017

Use the normalize solution then.

@astorije
Copy link
Member

@MaxLeiter, do you think you'll manage to do that today? If so I can draft the 2.3.2 release this weekend 🎉

@MaxLeiter
Copy link
Member Author

Done

@xPaw
Copy link
Member

xPaw commented Jun 23, 2017

@MaxLeiter use tabs to fix stylelint.

before: https://sr.ht/mdPx.png

after: https://sr.ht/h45R.png

Basically, safari's user agent CSS applies an underline to <abbr> tags, which bootstrap already does as well (but bootstrap doesn't use text-decoration so it's not overriden).
@xPaw xPaw merged commit c9f63fc into thelounge:master Jun 24, 2017
@MaxLeiter MaxLeiter deleted the patch-3 branch June 24, 2017 09:19
@astorije astorije added the Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. label Jun 24, 2017
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants