flavorjones / loofah

Ruby library for HTML/XML transformation and sanitization
MIT License
934 stars 137 forks source link

Add more css properties, shorthands #258

Closed lucyxiang closed 5 months ago

lucyxiang commented 1 year ago

Noticed that ACCEPTABLE_CSS_PROPERTIES is missing properties so adding some more (non exhaustive).

There’s a hodge podge of reasons why I choose these properties: I read through a bunch of “most common css properties / shorthands articles" and guesstimated what would be popular

flavorjones commented 1 year ago

@lucyxiang There are some failing tests because the existing shorthand CSS properties logic appears to have a bug that I'll need to dig into.

Can you break this up into two pull requests: one for the properties and keywords (which I think can be merged quickly), and another one for the additional shorthand properties (which I'll use to debug the failing tests)?

flavorjones commented 1 year ago

These properties and keywords look OK! There is one failing test, though, which looks like it's failing because the position property was previously disallowed but is now allowed. Are you able to update that test so it passes?

flavorjones commented 6 months ago

For Rails Conf 2024 hack day, maybe someone would be willing to put in a little bit more work to get this merged?

factcondenser commented 6 months ago

@flavorjones I'm continuing this work over in https://github.com/flavorjones/loofah/pull/283

flavorjones commented 5 months ago

Closing in favor of #283