-
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.
Merge branch '263731-webform-demo' into test
- Loading branch information
Showing
8 changed files
with
357 additions
and
174 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
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
91 changes: 91 additions & 0 deletions
91
web/themes/custom/parc/templates/components/webform/webform.pcss.css
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,91 @@ | ||
.webform-submission-form { | ||
.webform-section { | ||
.webform-section-title { | ||
font-size: 24px; | ||
font-weight: bold; | ||
margin-bottom: 20px; | ||
|
||
@media (--md) { | ||
margin-left: 330px; | ||
} | ||
} | ||
|
||
.webform-section-wrapper { | ||
.form-item { | ||
margin-bottom: 40px; | ||
|
||
@media (--md) { | ||
display: grid; | ||
grid-template-columns: 300px auto; | ||
grid-gap: 30px; | ||
} | ||
|
||
&.js-form-type-checkbox, | ||
&.js-form-type-radio { | ||
margin-bottom: 0; | ||
align-items: center; | ||
display: flex; | ||
gap: 7px; | ||
|
||
input { | ||
margin: 0 !important; | ||
} | ||
} | ||
|
||
&.js-form-type-checkbox { | ||
input { | ||
border-radius: 5px; | ||
} | ||
} | ||
|
||
label, legend { | ||
font-size: 14px; | ||
font-weight: 600; | ||
|
||
&:after { | ||
width: 0; | ||
} | ||
} | ||
|
||
.form-control { | ||
padding: 4px 12px; | ||
} | ||
|
||
input, textarea { | ||
border: 1px solid #000; | ||
} | ||
} | ||
|
||
.flex-container { | ||
@media (--lg) { | ||
display: flex; | ||
gap: 30px; | ||
|
||
.form-item:last-child { | ||
gap: 10px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
.form-actions { | ||
margin-top: 30px; | ||
|
||
.btn-primary { | ||
font-weight: 600; | ||
font-size: 14px; | ||
text-transform: uppercase; | ||
padding: 7px 15px; | ||
line-height: 18px; | ||
|
||
&:hover { | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
@media (--md) { | ||
margin-left: 330px; | ||
} | ||
} | ||
} |
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,30 @@ | ||
{# | ||
/** | ||
* @file | ||
* Theme implementation for a 'webform' element. | ||
* | ||
* This is an copy of the webform.html.twig theme_wrapper which includes the | ||
* 'title_prefix' and 'title_suffix' variables needed for | ||
* contextual links to appear. | ||
* | ||
* Available variables | ||
* - attributes: A list of HTML attributes for the wrapper element. | ||
* - children: The child elements of the webform. | ||
* - title_prefix: Additional output populated by modules, intended to be | ||
* displayed in front of the main title tag that appears in the template. | ||
* - title_suffix: Additional output populated by modules, intended to be | ||
* displayed after the main title tag that appears in the template. | ||
* | ||
* @see template_preprocess_webform() | ||
* @see _webform_form_after_build() | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
{{ attach_library('parc/webform') }} | ||
|
||
<form{{ attributes }}> | ||
{{ title_prefix }} | ||
{{ children }} | ||
{{ title_suffix }} | ||
</form> |