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

Add css support for text-decoration-line #251

Conversation

lukeluluke
Copy link

No description provided.

Copy link
Owner

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

The rule here is accidentally correct (because we're still on the HTML 4 definition of text-decoration) but not semantically correct for CSS3, where text-decoration-line is a subset of text-decoration functionality. It would be better to give it a separate class (although it's probably easiest to just do an Enum). Also, this new rule needs a test.

@Rah1x
Copy link
Contributor

Rah1x commented Jan 11, 2023

@ezyang
Do you mean the following?

$this->info['text-decoration-line'] = new HTMLPurifier_AttrDef_Enum(
    ['none', 'underline', 'overline', 'line-through']
);

Let me know if you are happy with this, I will create a new PR and also add a test.

@ezyang
Copy link
Owner

ezyang commented Jan 11, 2023

Yup plz do

@Rah1x
Copy link
Contributor

Rah1x commented Jan 12, 2023

Done. have a look:
#360

@Rah1x
Copy link
Contributor

Rah1x commented Jan 12, 2023

since this is now completed via #360, we can delete this PR.

@ezyang ezyang closed this Jan 12, 2023
@Rah1x Rah1x deleted the add-css-text-decoration-line branch January 12, 2023 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants