How to append any CSS class of one element to another element?

Please consider these PHP-Twig elements.

{{ page.content_above }}
{{ page.content }}
{{ page.content_below }}

I want that page.content_below element will contain all CSS classes of page.content.

This code pattern that includes all classes of page.content didn’t work:

{{ page.content_below.addClass(row_classes, ['region--content', 'grid-full', 'layout--pass--content-medium']) }}

How to append any CSS class of one element to another element?

I can do this with vanilla JavaScript this way:

document.querySelector('.region--content_below').classList.add('region--content', 'grid-full', 'layout--pass--content-medium');

Is there a way to do that otherwise? Regular PHP? CSS?

Just include the content-below class in the css declaration

.content, .content-below { text-color: red; } 

By “CSS” I meant to some possible bleeding-edge technology CSS command that will duplicate the CSS classes from element A to element B automatically but probably there is no such command yet :slight_smile:

When my content management system Drupal will get updated, the default theme change may be deleted but I might just duplicate the CSS of region--content to region--content_below in the sub-theme which Drupal updates should never modify.
Drupal’s default theme has some complex grid based CSS so it may be a bit frustrating for me to duplicate and maintain that CSS but maybe there is no other way.

CSS is for applying styles.
Classes are a programming element.