How to use stye attribute in custom block markup? I'm developing a custom block in Drupal 8. In my build() method I've got:

$progress_markup = array(
  '#theme' =&gt; 'progress_bar',
  '#percentage' =&gt; $registration_percentage,
  '#message' =&gt; array('#markup' =&gt; $registration_node_count . ' of ' . $this-&gt;configuration['capacity']),
);
$markup = \Drupal::theme()-&gt;render('progress_bar', $progress_markup);


This generates the following HTML:

&lt;div class="progress" data-drupal-progress&gt;
  &lt;div class="progress__track"&gt;&lt;div class="progress__bar" style="width: %"&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;div class="progress__percentage"&gt;%&lt;/div&gt;
  &lt;div class="progress__description"&gt;30 of 120&lt;/div&gt;
&lt;/div&gt;


However, when the block renders on the page, the style attribute has been removed. Here's the relevant D8 issue.

What I don't understand is: if I create a custom block and use Full HTML, and paste in the generated markup that contains the style attribute, Drupal 8 will happily render it. But when I generate this markup in the build() method, it gets removed.

Is there a way to specify, in the block plugin definition, that the build() method should not filter out any HTML? Any other thoughts on how ot get around this issue?
This is a working example of adding the style attribute to the render array of a block via the build() method.

&lt;?php
/**
 * @file
 * Contains Drupal\foo\Plugin\Block\FooBlock
 */


namespace Drupal\foo\Plugin\Block;
use Drupal\Core\Block\BlockBase;


/**
 * @block(
 *   id = "foo",
 *   admin_label = @Translation("Foo block")
 * )
 */
class FooBlock extends BlockBase {

  /**
   * Builds and returns the renderable array for this block plugin.
   *
   * If a block should not be rendered because it has no content, then this
   * method must also ensure to return no content: it must then only return an
   * empty array, or an empty array with #cache set (with cacheability metadata
   * indicating the circumstances for it being empty).
   *
   * @return array
   *   A renderable array representing the content of the block.
   *
   * @see \Drupal\block\BlockViewBuilder
   */
  public function build() {
    return [
      'inside' =&gt; [
        '#type' =&gt; 'html_tag',
        '#tag' =&gt; 'div',
        '#value' =&gt; 'Hello world',
        '#attributes' =&gt; [
          'class' =&gt; ['some-class'],
          'style' =&gt; ['color:red']
        ]
      ]
    ];
  }
}