Skip to content

feat: Distinct styling for anchors without href - #3204

Merged
web-padawan merged 1 commit into
masterfrom
feat/disabled-anchor-styling
Dec 29, 2021
Merged

web-padawan merged 1 commit into
masterfrom
feat/disabled-anchor-styling

Conversation

@rolfsmeds

Copy link
Copy Markdown
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)
@sonarqubecloud

Copy link
Copy Markdown

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

@rolfsmeds
rolfsmeds requested a review from mstahv December 29, 2021 11:54
@vaadin-bot

Copy link
Copy Markdown
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