Skip to content

Commit

Permalink
Merge pull request #473 from civicrm/CPS-332-support-new-button-markup
Browse files Browse the repository at this point in the history
CPS-322: Support new Button markup
  • Loading branch information
deb1990 authored Nov 5, 2020
2 parents 70d4e3a + 311fea7 commit 5bf1577
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 66 deletions.
23 changes: 17 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions scss/bootstrap/overrides/crm/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@
.crm-button-type-cancel,
.crm-button-type-delete {
border-color: $gray-light;
color: $gray-darker !important;

input {
color: $gray-darker !important;
}

input:hover {
&:hover {
color: $gray-dark !important;
}
}
22 changes: 22 additions & 0 deletions scss/civicrm/administer/civi-case/_case-types.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,28 @@
}
}
}

.crm-button {
@extend %btn-civi;

&[crm-icon=fa-check] {
@extend %btn-civi-primary;
padding: 8px 19px;
}

&[crm-icon=fa-times] {
@extend %btn-civi-secondary-outline;
border: solid 1px $gray-dark;
color: $gray;
margin: 0;
padding: 7px 19px;

&:hover {
background: $gray-dark;
color: $crm-white;
}
}
}
}

table tr.forked {
Expand Down
22 changes: 0 additions & 22 deletions scss/civicrm/administer/common/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,6 @@ ul.civihr-popup {
margin-right: 0;
}
}

.crm-button {
@extend %btn-civi;

&[crm-icon=fa-check] {
@extend %btn-civi-primary;
padding: 8px 19px;
}

&[crm-icon=fa-times] {
@extend %btn-civi-secondary-outline;
border: solid 1px $gray-dark;
color: $gray;
margin: 0;
padding: 7px 19px;

&:hover {
background: $gray-dark;
color: $crm-white;
}
}
}
}

.action-link {
Expand Down
5 changes: 3 additions & 2 deletions scss/civicrm/administer/contribute/_managepremiums.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
}

.premium-full-disabled {
input[type='button'] {
button {
background: darken($crm-copy, $crm-darken-percentage);
margin: 20px 0;
}
}

.crm-contribution-manage_premiums-form-block {
padding: 0;

.collapsible-title {
margin-bottom: 0;
}
Expand Down
7 changes: 1 addition & 6 deletions scss/civicrm/administer/display/_display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,8 @@
padding: 0;
}

.crm-i {
margin: 0 -25px 0 15px !important;
}

#ckeditor_config {
margin: 0 !important;
padding-left: 30px;
padding: 8px 12px;
}
}
}
Expand Down
31 changes: 14 additions & 17 deletions scss/civicrm/common/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ $button-border-radius: 2px;
}
}

input.crm-form-submit {
button.crm-form-submit {
background: $brand-primary;
border-color: $brand-primary;
border-radius: $border-radius-base;
box-sizing: content-box;
font-family: $font-family-base;
margin-right: 0;
padding: 8px 12px;
Expand Down Expand Up @@ -102,7 +103,7 @@ $button-border-radius: 2px;
}
}

input.crm-form-submit {
button.crm-form-submit {
color: $crm-cancel-color !important;

&:hover {
Expand Down Expand Up @@ -151,15 +152,12 @@ $button-border-radius: 2px;

.crm-button-type-cancel,
.crm-button-type-back {
input {
border: solid 1px $gray-dark;
///The default theme uses "!important"
color: $crm-cancel-color !important;

&:hover {
background: darken($crm-copy, $crm-darken-percentage);
color: $crm-white !important;
}
border: solid 1px $gray-dark;
color: $crm-cancel-color !important; // The default theme uses "!important"

&:hover {
background: darken($crm-copy, $crm-darken-percentage);
color: $crm-white !important;
}
}
}
Expand All @@ -178,8 +176,8 @@ $button-border-radius: 2px;
line-height: 35px;
}

#crm-submit-buttons input.crm-form-submit,
.crm-button input.crm-form-submit,
#crm-submit-buttons button.crm-form-submit,
button.crm-button.crm-form-submit,
.crm-hover-button,
.ui-dialog-buttonset .ui-button,
a.button,
Expand Down Expand Up @@ -254,15 +252,13 @@ $button-border-radius: 2px;
.crm-i {
background-color: transparent !important;
color: $crm-white;
padding: 2px 3px;
top: 0;
padding: 0 2px;
}
}

.crm-i {
line-height: inherit;
text-shadow: none;
vertical-align: middle;
}

.crm-button-type-refresh {
Expand Down Expand Up @@ -381,8 +377,9 @@ button {
border: 0;
border-radius: $border-radius-base;
color: $crm-white;
cursor: pointer;
font-family: $font-family-base;
line-height: 1;
line-height: $line-height-base;
padding: 11px 12px;
text-shadow: none;
text-transform: uppercase;
Expand Down
2 changes: 1 addition & 1 deletion scss/civicrm/contact/pages/_contributions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ form.CRM_Contribute_Form_ContributionCharts {
.form-layout-compressed {
margin: 20px 0 0;

input.crm-form-submit {
button.crm-form-submit {
margin-left: 5px;
padding: 4px 10px;
text-shadow: none;
Expand Down
2 changes: 1 addition & 1 deletion scss/civicrm/financial/_batchtransaction.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

.form-layout-compressed {
input.crm-form-submit {
button.crm-form-submit {
margin-left: 5px;
padding: 4px 10px;
vertical-align: middle;
Expand Down
6 changes: 1 addition & 5 deletions scss/civicrm/search/pages/_advanced-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
}

.form-layout {
.crm-i-button {
.crm-form-submit {
margin-left: 20px;
margin-top: 15px;

.crm-i { /* stylelint-disable-line selector-max-compound-selectors */
top: -2px;
}
}
}
}
4 changes: 3 additions & 1 deletion scss/civicrm/search/pages/_full-text-search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

.CRM_Contact_Form_Search_Custom .crm-search-form-block table.form-layout-compressed {
td {
input.crm-form-submit {
button.crm-form-submit {
@extend .btn-sm;
float: none;
margin-left: 20px !important;
vertical-align: initial;
}
}

Expand Down

0 comments on commit 5bf1577

Please sign in to comment.