-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oik/contact-field - Add 3 styles #207
- Loading branch information
1 parent
7ab9a88
commit 2273fac
Showing
11 changed files
with
120 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
/* | ||
Display each field using as a grid layout in the block editor. | ||
Display each field using a grid layout in the block editor. | ||
*/ | ||
|
||
.wp-block-oik-contact-field { | ||
.wp-block-oik-contact-field.is-style-grid > div { | ||
display: grid; | ||
gap: 10px; | ||
grid-template-columns: 1fr 3fr; | ||
} | ||
|
||
label { | ||
/** | ||
No need for any specific styling for is-style-above | ||
since that's what happens by default. | ||
*/ | ||
|
||
} | ||
div.field { | ||
/** | ||
Styling for reversing the fields. Useful for checkboxes. | ||
*/ | ||
.wp-block-oik-contact-field.is-style-reversed > div { | ||
display: grid; | ||
gap: 10px; | ||
grid-template-columns: 1fr 3fr; | ||
} | ||
|
||
} | ||
.wp-block-oik-contact-field.is-style-reversed > div .label { | ||
grid-column-start: 2; | ||
grid-row-start: 1; | ||
} | ||
|
||
.wp-block-oik-contact-field.is-style-reversed > div .field { | ||
grid-column-start: 1; | ||
grid-row-start: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.bw_contact_form .bw_grid > div, | ||
.bw_contact_form bw_grid .is-style-grid { | ||
display: grid; | ||
gap: 10px; | ||
grid-template-columns: 1fr 3fr; | ||
} | ||
|
||
/** | ||
* We don't need the vertical space between the label and the field | ||
*/ | ||
.bw_contact_form .bw_grid .is-style-above, | ||
.wp-block-oik-contact-field .is-style-above { | ||
display: grid; | ||
grid-template-columns: 1fr; | ||
} | ||
|
||
/** | ||
* Reverse the field order - primarily for checkboxes | ||
*/ | ||
.bw_contact_form .bw_grid .is-style-reversed > div, | ||
.bw_contact_form .bw_grid .is-style-reversed { | ||
display: grid; | ||
gap: 10px; | ||
grid-template-columns: 1fr 3fr; | ||
} | ||
|
||
.bw_contact_form .bw_grid .is-style-reversed > div .label, | ||
.bw_contact_form .bw_grid .is-style-reversed > label { | ||
grid-column-start: 2; | ||
grid-row-start: 1; | ||
} | ||
|
||
.bw_contact_form .bw_grid .is-style-reversed > div .field, | ||
.bw_contact_form .bw_grid .is-style-reversed input { | ||
grid-column-start: 1; | ||
grid-row-start: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters