Closed knennigtri closed 1 year ago
@knennigtri Couldnt we just add CSS?:
body.xf-web-container .root {
all: unset;
}
(...or whatever needs to be unset/zero'd out)
my concern is that AEM OOTB the node name is called root, so i think you'd have to go in there and change the node names everything manually (in template and any existing nodes).
This is probably a simpler/more elegant solution. Let me investigate.
It looks like when an XF is imported into Target the HTML is different:
<div class="teaser cmp-teaser--featured aem-GridColumn aem-GridColumn--default--12">
<div id="featured-article-magazine" class="cmp-teaser at-element-marker">
<div>
js/css for XF loaded
<div class="container">
<div class="root container responsivegrid">
.....
Based on this snippet and @davidjgonzalez suggestion, I've updated this PR to update only elements.scss
When using the WKND XFs in Target on a WKND page, the HTML imported into Target contains:
WKND's css library uses
body .root {
to set spacing at the top of the WKND site with elements.scss:When a WKND XF is added to a WKND page using the VEC with an imported XF from AEM, the css above is applied to the XF and therefore the component padding-top is set to $header-height.
This can be fixed by fixing the template-type and template for the WKND experience fragment template.
Description
Under ui.content.sample and ui.content the
root
nodes are updated toxf-root
:This allows the WKND XFs to be imported into Target without the root class and therefor, the padding is not applied:
Motivation and Context
This allows anyone to use WKND as a reference website for the AEM XF and Adobe Target integration flawlessly.
Someone can now use the pre-created XF content in WKND and apply it successfully and beautifully to the WKND site using Adobe Target without the components 'jumping around' on the page.
How Has This Been Tested?
All tested locally on 2023.06 SDK
Checklist: