Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Add font smoothing + text link styles #220

Merged
merged 5 commits into from
Nov 9, 2021
Merged

Add font smoothing + text link styles #220

merged 5 commits into from
Nov 9, 2021

Conversation

kjellr
Copy link
Collaborator

@kjellr kjellr commented Nov 9, 2021

Fixes #108 and #161.

Loads the style.css file in the editor, and then adds CSS for font smoothing, and for basic text link styles (including hover, active, and focus). These styles do not impose a text-decoration: underline rule, so they won't effect or override elements that don't have an underline by default (like the button block).

Each group of rules is accompanied by a description of why it's implemented with CSS, and points to a Gutenberg issue for more details.

Screenshots

Link hover state:

link

Note: I went with a dashed instead of dotted underline so that it better matches the dashed lines used throughout the bird patterns.

Before After
Screen Shot 2021-11-09 at 10 28 52 Screen Shot 2021-11-09 at 10 28 40

@kjellr kjellr added the [Type] Enhancement New feature or request label Nov 9, 2021
@kjellr kjellr requested a review from jffng November 9, 2021 15:29
@kjellr kjellr self-assigned this Nov 9, 2021
@kjellr kjellr changed the title Add/css rules Add font smoothing + text link styles. Nov 9, 2021
@kjellr kjellr changed the title Add font smoothing + text link styles. Add font smoothing + text link styles Nov 9, 2021
@kjellr
Copy link
Collaborator Author

kjellr commented Nov 9, 2021

Note that some of the underline rules can be added to theme.json via this technique, but it seems a little delicate to me, and we'd still require CSS for some other text link styles.

Copy link
Collaborator

@jffng jffng left a comment

Choose a reason for hiding this comment

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

Some small changes, otherwise LGTM.

functions.php Outdated Show resolved Hide resolved
style.css Outdated Show resolved Hide resolved
style.css Outdated Show resolved Hide resolved
kjellr and others added 3 commits November 9, 2021 11:49
Co-authored-by: Jeff Ong <[email protected]>
Co-authored-by: Jeff Ong <[email protected]>
Co-authored-by: Jeff Ong <[email protected]>
@kjellr kjellr merged commit 9437367 into trunk Nov 9, 2021
@kjellr kjellr deleted the add/css-rules branch November 9, 2021 16:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Type] Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text links need improved styles
2 participants