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.
Overview
This PR fixes an issue where CiviCRM buttons inside of Bootstrap templates break.
Before & After
CRM buttons
Before
After
Technical details
All
.crm-button
and.crm-form-submit
buttons inside of#bootstrap-theme
would have their style overridden by acolor: inherit
f3e73be#diff-293f309d5b967b2ce90466201daefdeaad764020a635e624f1ac6b19d225fb2bR257 andtext-transform: none
f3e73be#diff-293f309d5b967b2ce90466201daefdeaad764020a635e624f1ac6b19d225fb2bR279 that should be applied to bootstrap buttons. To avoid this, we overrode the definitions for.crm-button
and.crm-form-submit
by adding an!important
to their color and text transform properties. This way Bootstrap can't replace these properties for these buttons.Upload buttons
Before
After
Technical details
Upload buttons are submit buttons used in forms, not necessarily for uploading files. These need to look like any other button. Previously we defined these upload buttons as outlines:
e948807#diff-d70c310903cd4caf4066146aa6a16294bb25f009a7f6a7f7b85d63c494525f3dR1-R7
The reason for this is not clear (since the file history is not complete) and the
// Makes next and upload buttons look like primary buttons:
comment is not clear sincebutton-outline-variant
displays outlined buttons, not primary buttons. We have only removed this from the upload buttons, but need to investigate "next" buttons to confirm if the style is right for them.Backstop Report:
https://github.com/compucorp/backstopjs-config/actions/runs/636368203
Some artifacts were found, but manually confirmed that no actual regressions were introduced.