Faq: Default

No notes defined.

<ul class="sds-faq sds-stackSm list-unstyled">

    <li class="sds-faq__item">

        <a data-scope-wrapper="box" data-scope="sunken" href="" class="sds-faq__action">
            <span class="sds-btn -iconBtn -btnSecondary sds-faq__actionIcon" aria-hidden="true">

                <span aria-hidden="true" class="sds-icon sds-icon-arrownext"></span>

            </span>
            <span class="sds-faq__actionText">Accordion collapse item</span>
        </a>

    </li>

    <li class="sds-faq__item">

        <a data-scope-wrapper="box" data-scope="sunken" href="" class="sds-faq__action">
            <span class="sds-btn -iconBtn -btnSecondary sds-faq__actionIcon" aria-hidden="true">

                <span aria-hidden="true" class="sds-icon sds-icon-arrownext"></span>

            </span>
            <span class="sds-faq__actionText">Accordion collapse item 2</span>
        </a>

    </li>

</ul>
<ul class="{{ namespace }}faq {{ namespace }}stackSm list-unstyled{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}"{% if accordion %} id="{{ accordion }}"{% endif %}>
	{% for key, item in items %}
		<li class="{{ namespace }}faq__item"{% if accordion %} id="faqItem-{{ loop.index }}"{% endif %}>
			{% if accordion or modal %}
				<button type="button"
						data-scope-wrapper="box"
						data-scope="{{ scope or "sunken" }}"
						class="{{ namespace }}faq__action"
					{% if modal %} data-toggle="modal" data-target="#{{ modal }}"{% endif %}
					{% if accordion %} data-toggle="collapse" data-target="#faqCollapse-{{ loop.index }}" aria-controls="faqCollapse-{{ loop.index }}" aria-expanded="{% if item.expanded %}{{ item.expanded }}{% else %}{{ expanded }}{% endif %}"{% endif %}
				>
					{% render "@icon-btn-secondary",{
						classes: [namespace + "faq__actionIcon"],
						eltType: "span",
						icon: icon,
						attrs: {
							"aria-hidden": "true"
						}
					},true %}
					<span class="{{ namespace }}faq__actionText">{{ item.text }}</span>
				</button>
				{% if accordion %}
					<div data-scope-wrapper="box" data-scope="flat" class="{{ namespace }}faq__collapse collapse{% if item.expanded === "true" or expanded === "true" %} show{% endif %}" id="faqCollapse-{{ loop.index }}" data-parent="#{{ accordion }}" aria-labelledby="faqItem-{{ loop.index }}{{ loop.index }}">
						<div class="{{ namespace }}faq__collapseInner {{ namespace }}stripContainerPadding">
							<div class="container">
								<div class="{{ namespace }}faq__collapseSeparator">
									{% render "@brand-line" %}
								</div>
								{{ collapseText }}
							</div>
						</div>
					</div>
				{% endif %}
			{% else %}
				<a data-scope-wrapper="box" data-scope="{{ scope or "sunken" }}" href="{{ href }}"{% if targetBlank %} target="_blank"{% endif %} class="{{ namespace }}faq__action">
					{% render "@icon-btn-secondary",{
						classes: [namespace + "faq__actionIcon"],
						eltType: "span",
						icon: icon,
						attrs: {
							"aria-hidden": "true"
						}
					},true %}
					<span class="{{ namespace }}faq__actionText">{{ item.text }}</span>
				</a>
			{% endif %}
		</li>
	{% endfor %}
</ul>
  • Content:
    /* variables specific to current element */
    
    $element-specific-variables: "";
    
    .#{$namespace}faq {
    
    	/* Save root element context for easy access if nesting is needed */
    
    	$self: &;
    
    	/* properties of current element  + media queries */
    
    
    	/* Pseudo Elements */
    
    	&::before {
    	}
    
    	&::after {
    	}
    
    	/*
    	Include elements that are linked to the current element but have to reside at the root level of the stylesheet
    	(e.g: keyframes)
    	*/
    	@at-root {
    	}
    
    
    	/* children - write selector in full in comments in order to facilitate search */
    
    	// faq__item
    	&__item {
    
    		// follows same logic as parent
    
    		--collapse-opacity-reveal: 0;
    		--separator-reveal-transition: $transition-collapse-duration;
    
    		@include custom-prop-fallback("border-radius","comp-faq-border-radius");
    		@include custom-prop-fallback("background-color","comp-faq-open-background-color");
    		position: relative;
    		z-index: z("zero");
    
    		&:before {
    
    			content: "";
    			@include custom-prop-fallback("box-shadow","comp-faq-open-box-shadow");
    			@include custom-prop-fallback("border-radius","comp-faq-border-radius");
    			position: absolute;
    			z-index: z("negative");
    			inset: 0;
    
    		}
    
    		&:has(#{$self}__action[aria-expanded="true"]) {
    
    			--collapse-opacity-reveal: 1;
    			--separator-reveal-transition: 0;
    			@include custom-prop-fallback-override("comp-faq-highlight-background-color","comp-faq-open-background-color");
    
    			#{$self}__action {
    
    				background-color: inherit;
    
    			}
    
    		}
    
    	}
    
    	&__action {
    
    		position: relative;
    		z-index: z("high");
    
    		display: flex;
    		align-items: center;
    		width: 100%; // for buttons
    		text-align: left; // for buttons
    		border-radius: inherit;
    		@include custom-prop-fallback("gap","comp-faq-inline");
    		@include custom-prop-fallback("padding","comp-faq-inset-h");
    		@include custom-prop-fallback("color","comp-faq-text-color");
    
    		@include hover() {
    
    			@include custom-prop-fallback("background-color","comp-faq-hovered-background-color")
    
    		}
    
    		@include focus-visible() {
    
    			@include box-outline();
    
    		}
    
    	}
    
    	&__actionText {
    
    		@extend %headingBase;
    		@extend %h4;
    
    	}
    
    	&__collapse,
    	&__collapseInner {
    
    		@include custom-prop-fallback("border-bottom-left-radius","comp-faq-border-radius");
    		@include custom-prop-fallback("border-bottom-right-radius","comp-faq-border-radius");
    
    	}
    
    	&__collapse {
    
    		transition: $transition-collapse;
    
    	}
    
    	&__collapseInner {
    
    		@include custom-prop-fallback("padding","comp-faq-inset-h");
    		padding-top: 0;
    
    	}
    
    	&__collapseSeparator,
    	&__item::before {
    
    		opacity: var(--collapse-opacity-reveal);
    		transition: $transition-fade;
    
    	}
    
    	&__collapseSeparator {
    
    		@include custom-prop-fallback("margin-bottom","comp-faq-inset-h");
    		transition-delay: calc(var(--separator-reveal-transition) * 25);
    
    	}
    
    	/* modifiers */
    
    	// faq -faqSm
    	&.-faqSm {
    
    		// follows same logic as base element
    
    		@include custom-prop-fallback-override("comp-faq-inset-h","comp-faq-small-inset-h");
    
    	}
    
    	&.-faqHighlight.-faqHighlight.-faqHighlight {
    
    		//@include custom-prop-fallback-override("comp-button-secondary-background-color","");
    		//@include custom-prop-fallback-override("comp-button-inverted-background-color","");
    
    		#{$self}__action {
    
    			@include custom-prop-fallback("background-color","comp-faq-highlight-background-color");
    
    			@include focus-visible(){
    				@include custom-prop-fallback-override("comp-box-pressed-border-color","comp-faq-highlight-pressed-border-color");
    			}
    
    		}
    
    	}
    
    	/* random parent element */
    	/* 
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    		@media (hover: hover) {
    
    		}
    	}
    
    	&:focus {
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/faq/_faq.scss
  • Filesystem Path: components/token-based/content/faq/_faq.scss
  • Size: 3.6 KB