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

Generalize disabled nav links CSS rules #38774

Merged
merged 2 commits into from
Jun 25, 2023
Merged

Generalize disabled nav links CSS rules #38774

merged 2 commits into from
Jun 25, 2023

Conversation

julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Jun 14, 2023

Description

Most of the time, our .nav-links are really links and don't need :disabled rules. However, we provide JavaScript examples (e.g. with .nav-tabs) where we use <button>s that can need :disabled rules.

This PR suggest a kind of defensive approach where the disabled state is defined globally for all .nav-links using .disabled and :disabled selectors.

It allows us to remove the other rules defining the colors.

⚠️ Rules defining transparent "color" to background and border were also removed because I couldn't notice use cases where it was actually changing anything. I haven't found anything in the history, but it can be put back if you are aware about any use cases where it's mandatory.

Please double-check different complex use cases to avoid any regressions since the documentation does not reflect all possibilities.

Type of changes

  • Enhancement (non-breaking change which adds functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • (N/A) My change introduces changes to the documentation
  • (N/A) I have updated the documentation accordingly
  • (N/A) I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Linked to #38765 but doesn't take into account #38765 (comment)

@patrickhlauke
Copy link
Member

I looked at this purely for the #38765 scenario, and this fix here works great. not had a chance to go through all possible complex variations

@mdo mdo merged commit 9369cd9 into main Jun 25, 2023
@mdo mdo deleted the main-jd-disabled-nav-links branch June 25, 2023 21:43
romankupchak93 pushed a commit to romankupchak93/bootstrap that referenced this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants