Remove the extra 'white-space: normal' CSS for FidesJS HTML descriptions #4850
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description Of Changes
This removes a tiny little CSS override when using HTML descriptions in FidesJS components. The net result is that, by default, FidesJS is going to treat whitespace as significant when provided by the Admin UI forms, which is just more intuitive for end-users: we implicitly want to write paragraphs of text with newlines, etc.
This'll make it easier to support a real rich text editor in the future, too, by not rendering our plaintext/richtext descriptions with slightly different CSS rules.
FYI: I was the one that put this CSS rule there in the first place, because I thought (incorrectly!) that this would be a safer default for HTML descriptions, but that's just hogwash and I see the error of my ways now.
I checked to ensure that all existing usage of HTML descriptions is unaffected by this change, so let's do this now before it would actually break something!
Code Changes
.fides-html-description
CSSSteps to Confirm
Run the Cypress tests to take a look at how we style the same example HTML description with/without HTML support enabled...
Pre-Merge Checklist
CHANGELOG.md