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

feat: Distinct styling for anchors without href #3204

Merged
merged 1 commit into from
Dec 29, 2021

Conversation

rolfsmeds
Copy link
Contributor

Flow intends to use (temporary) href attribute removal to disable anchors (as they lack a native disabled state), see vaadin/flow#10924. This PR changes Lumo styling of anchors so that the regular styling is applied only to anchors with href (using the :any-link pseudoclass) and Lumo disabled text color is instead applied to those without.

Potential breaking change: if an app contains href-less anchors (and e.g. use click event to do stuff instead) they will now have a disabled text color. However, at least Flow apps are almost guaranteed to have an empty href rather than missing one (unless developer has explicitly removed the empty href), so this is very unlikely to affect Flow-based apps.

Fixes #1594

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended (not really testable until Flow fix is in)
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

… added a disabled text color for anchors without href (so that Flow can remove the href to make anchors disabled)
@sonarcloud
Copy link

sonarcloud bot commented Dec 20, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with platform 23.0.0.

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

Successfully merging this pull request may close these issues.

Add style for disabled anchor elements
5 participants