Using do addInlineCss() in partials?

Is this supposed to work?

I’m trying to add to my inline style with this in a partial included in base.html.twig using {% include 'xxx-xxx.html.twig' %}but it isn’t working. If i add the same {% do assets.addInlineCss('') %} in base.html.twig it works.

How does your rendered page source look, is there something wrong with it, or does the inline css not appear at all? Is the link correct: 'xxx-xxx.html.twig' and not 'partials/xxx-xxx.html.twig'?

The source code shows the content of the partial. I also see my other inline CSS added by the various modules of the modular page. The added CSS by the xxx-xxx.html.twig partial is the only thing missing.

I just checked {{ dump(assets) }} to see that my inline CSS test is there. It’s the .aaaaa{...} part at the end:

  Grav\Common\Assets {#34
  #fetch_command: null
  #css_pipeline: false
  #css_pipeline_include_externals: true
  #css_pipeline_before_excludes: true
  #js_pipeline: false
  #js_pipeline_include_externals: true
  #js_pipeline_before_excludes: true
  #inline_css: array:4 [
    "5827723666129bb6d49f8bc832e25064" => array:4 [
      "priority" => 10
      "order" => 0
      "asset" => "#divX {color: #ffffff;background-color: #112234;background-attachment: scroll;background-repeat: no-repeat;background-size: auto;background-position: left top;position: relative;}"
      "group" => "head"
    ]
    "3d54eeeb139d873ec9bf7620e21c10dc" => array:4 [
      "priority" => 10 
      "order" => 1
      "asset" => "#divXX{color:#dc291e}"
      "group" => "head"
    ]
    "c7d1d9e0ada98ab35fe26fd8bf2410b9" => array:4 [
      "priority" => 10
      "order" => 2
      "asset" => "#divXXX {color: #ffffff;} #divXXX .pllx {background-color: #112234;} @media screen and (min-width: 40em) {#divXXX .pllx {background-image: url();}}"
      "group" => "head"
    ]
    "48aae6f0af64059334a52992eefe72ce" => array:4 [
      "priority" => 10
      "order" => 3
      "asset" => ".aaaa { background:red; }"
      "group" => "head"
    ]
  ]

If I put {{ assets.css() }} at the very bottom of base.html.twig the inlined CSS in my menu small-menu-li.html.twig (called xxx-xxx.html.twig in previous posts) shows correctly.