sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Removed background-image from list of supported CSS properties.

Open willholland opened this issue 4 years ago • 7 comments

Category

  • [x] Content fix
  • [ ] New article

Related issues

  • No related issues

What's in this Pull Request?

Removed background-image from the list of CSS properties supported with custom column formatting.

This background-image CSS property requires the use of the '(' character, which is prohibited from use in the formatting schema and results in an error when used.

willholland avatar Mar 15 '21 19:03 willholland

Docs Build status updates of commit 05cd53a:

:x: Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
:x:Error Details

  • [Error-RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

VesaJuvonen avatar Mar 15 '21 19:03 VesaJuvonen

Technically, background-image is a whitelisted style property so the documentation isn't wrong. Practically, however, I agree that it's pretty useless to set it to initial or inherit (since all other uses are blocked because of how parenthesis in values are handled).

I wonder if a better approach might be to add an asterisk to the property and a note under the list describing the issue with parenthesis in values. (Basically everything but rgba() is blocked)

thechriskent avatar Mar 15 '21 21:03 thechriskent

I'd be happy to make whatever updates the team thinks best, so just let me know how I can help.

willholland avatar Mar 19 '21 15:03 willholland

@VesaJuvonen - any feedback on how we can improve this?

willholland avatar Apr 01 '21 12:04 willholland

Technically, background-image is a whitelisted style property so the documentation isn't wrong. Practically, however, I agree that it's pretty useless to set it to initial or inherit (since all other uses are blocked because of how parenthesis in values are handled).

I wonder if a better approach might be to add an asterisk to the property and a note under the list describing the issue with parenthesis in values. (Basically everything but rgba() is blocked)

Sorry for playing devils advocate here but technically many those properties can have a '(' in their values. To make it dependant which CSS property is allowed and which not by these characters is might not be the best approache forward.

StfBauer avatar Feb 22 '24 10:02 StfBauer

Technically, background-image is a whitelisted style property so the documentation isn't wrong. Practically, however, I agree that it's pretty useless to set it to initial or inherit (since all other uses are blocked because of how parenthesis in values are handled). I wonder if a better approach might be to add an asterisk to the property and a note under the list describing the issue with parenthesis in values. (Basically everything but rgba() is blocked)

Sorry for playing devils advocate here but technically many those properties can have a '(' in their values. To make it dependant which CSS property is allowed and which not by these characters is might not be the best approache forward.

We're not in disagreement. I think it's terrible how restricted the CSS values are. Basically, the values are checked for specific use cases like rgba( and translate( and all other uses of ( will invalidate your style value.

Since this is a discussion of the docs, my suggestion was to at least note the issue on the docs to avoid surprising users. My real ask would be to adjust the silly regex they're using to allow for more valid values but that is something the Microsoft team would have to do whereas the docs are something the community can help with.

thechriskent avatar Feb 22 '24 16:02 thechriskent

In consultation with Microsoft, it was decided to close this PR primarily due to its age and lack of activity. Please feel free to submit a new PR without conflicts and reference this PR via the GH linking syntax (#PRNUM) if you'd like to restart the discussion.

andrewconnell avatar Feb 26 '25 13:02 andrewconnell