Unverified Commit 5c5ca6d8 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3117217 by bnjmnm, lauriii: Decouple core theme dependency on functions in stable.theme

parent 3594d556
Loading
Loading
Loading
Loading
+9 −0
Changes for core/modules/filter/src/Element/TextFormat.php: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -124,6 +124,9 @@ public static function processFormat(&$element, FormStateInterface $form_state,
    // Setup child container for the text format widget.
    $element['format'] = [
      '#type' => 'container',
      '#theme_wrappers' => [
        'container__text_format_filter_wrapper',
      ],
      '#attributes' => ['class' => ['js-filter-wrapper']],
    ];

@@ -166,6 +169,9 @@ public static function processFormat(&$element, FormStateInterface $form_state,
    $element['format']['guidelines'] = [
      '#type' => 'container',
      '#attributes' => ['class' => ['js-filter-guidelines']],
      '#theme_wrappers' => [
        'container__text_format_filter_guidelines',
      ],
      '#weight' => 20,
    ];
    $options = [];
@@ -190,6 +196,9 @@ public static function processFormat(&$element, FormStateInterface $form_state,

    $element['format']['help'] = [
      '#type' => 'container',
      '#theme_wrappers' => [
        'container__text_format_filter_help',
      ],
      'about' => [
        '#type' => 'link',
        '#title' => t('About text formats'),
+81 −0
Changes for core/profiles/demo_umami/themes/umami/css/theme/filter.admin.css: 81 added lines, 0 removed lines.
Original line number Diff line number Diff line

/**
 * @file
 * Admin styling for the Filter module.
 */

/**
 * Filter information under field.
 */
.text-format-wrapper > .form-item {
  margin-bottom: 0;
}

.filter-wrapper {
  overflow: hidden;
  margin: 0;
  padding: 0.5em 0.666em;
  border: 1px solid #ccc;
  border-top: 0;
}
.filter-wrapper .form-item {
  margin: 0;
}
.filter-wrapper .form-item label {
  display: inline;
}

.filter-help {
  float: right; /* LTR */
}
[dir="rtl"] .filter-help {
  float: left;
}
.filter-guidelines .filter-guidelines-item {
  margin-top: 1em;
}
.filter-help p {
  margin: 0;
}
.filter-help a {
  position: relative;
  margin: 0 20px 0 0; /* LTR */
}
[dir="rtl"] .filter-help a {
  margin: 0 0 0 20px;
}
.filter-help a:after {
  position: absolute;
  top: 0;
  right: -20px; /* LTR */
  display: block;
  width: 16px;
  height: 16px;
  content: "";
  background: transparent url(../../../../../../misc/help.png);
}
[dir="rtl"] .filter-help a:after {
  right: auto;
  left: -20px;
}

.text-format-wrapper .description {
  margin-top: 0.5em;
}
.tips {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.9em;
}

/**
 * Improve filter tips position.
 */
.tips {
  padding-left: 0; /* LTR */
}
[dir="rtl"] .tips {
  padding-right: 0;
}
+24 −0
Changes for core/profiles/demo_umami/themes/umami/templates/components/text_format/container--text-format-filter-guidelines.html.twig: 24 added lines, 0 removed lines.
Original line number Diff line number Diff line
{#
/**
 * @file
 * Theme implementation for text filter guidelines.
 *
 * Available variables:
 * - attributes: HTML attributes for the containing element.
 * - children: The rendered child elements of the container.
 * - has_parent: A flag to indicate that the container has one or more parent
 *   containers.
 *
 * @see template_preprocess_container()
 *
 * @ingroup themeable
 */
#}
{%
  set classes = [
    has_parent ? 'js-form-wrapper',
    has_parent ? 'form-wrapper',
    'filter-guidelines',
  ]
%}
<div{{ attributes.addClass(classes) }}>{{ children }}</div>
+22 −0
Changes for core/profiles/demo_umami/themes/umami/templates/components/text_format/container--text-format-filter-help.html.twig: 22 added lines, 0 removed lines.
Original line number Diff line number Diff line
{#
/**
 * @file
 * Theme implementation for text filter help.
 *
 * Available variables:
 * - attributes: HTML attributes for the containing element.
 * - children: The rendered child elements of the container.
 *
 * @see template_preprocess_container()
 *
 * @ingroup themeable
 */
#}
{%
  set classes = [
    has_parent ? 'js-form-wrapper',
    has_parent ? 'form-wrapper',
    'filter-help',
  ]
%}
<div{{ attributes.addClass(classes) }}>{{ children }}</div>
+24 −0
Changes for core/profiles/demo_umami/themes/umami/templates/components/text_format/container--text-format-filter-wrapper.html.twig: 24 added lines, 0 removed lines.
Original line number Diff line number Diff line
{#
/**
 * @file
 * Theme implementation for the text filter wrapper.
 *
 * Available variables:
 * - attributes: HTML attributes for the containing element.
 * - children: The rendered child elements of the container.
 * - has_parent: A flag to indicate that the container has one or more parent
 *   containers.
 *
 * @see template_preprocess_container()
 *
 * @ingroup themeable
 */
#}
{%
  set classes = [
    has_parent ? 'js-form-wrapper',
    has_parent ? 'form-wrapper',
    'filter-wrapper',
  ]
%}
<div{{ attributes.addClass(classes) }}>{{ children }}</div>
Loading