Inline CSS and javascript in Plone 5.2.2

Did something happen with 'filtering' in Plone 5.2.2

I think this is the way I usually do this, but <script> and <style> are not in the rendered output

PS: I also tried to move it inside body and metal:block

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      i18n:domain="medialog.vestruss"
      metal:use-macro="context/main_template/macros/master">
<body>
  <metal:block fill-slot="content-core">
    <h1>Russestyre</h1>
    <table class="navnelist">
        <tr><th>Funksjon</th><th>Navn</th><th>e-post</th></tr>
        <tr tal:repeat="russ context/lokalt_russestyre|None">
          <td>${russ/funksjon|None}</td>
          <td>${russ/label|None}</td>
          <td>${russ/email|None}</td>
        </tr>
    </table>
    <p>&nbsp;</p>

  </metal:block>
  </body>

  <style>
    table.navnelist tbody tr th,  { border-color:  silver; padding:  10px 15px; color: #333; }
  </style>

  <script>require([
            'jquery',
            '++theme++dutchestheme/javascript/stacktable'
            ], function(Base) {
              'use strict';
               $('.navnelist').cardtable();
      });
  </script>
</html>

I'm not sure if this could have something to do with Diazo-Rules? I don't know which Plone Version exactly it was, but we had a Plone 5 where we had to exclude some script and style-Tags on special views in the index or manifest data to use them inline (just a hint/wild guess).

Else you could probably use head-slots?
https://docs.plone.org/adapt-and-extend/theming/templates_css/template_basics.html#head-slots

My thought was that google rates you higher if you load the CSS/script last. Not sure if that is true.

If you use 'require' as I do, it looks like I need to use javascript slot (not head slot)

@espenmn I don't understand why your example would have worked at all in previous versions of Plone.

You are using METAL You call use-macro on the outer html tag. And from the called template (main_template/macros/master) you only fill in the content-core slot with fill-slot. Everything else in your template outside that fill-slot (the body tags, and the style/script tags) is not transported into the main_template master macro.

I probably had it inside the fill slot. (as said: I tried all 'places').

I have not had the time to test properly, but it looks like the same 'code' (a script with just 'alert' ) work, so I think the code get stripped out on 'certain occasions).

UPDATE: I think this is related to 'Plone 5.2.2 template issues' ( and $ in javascript confusing chameleon.

Plone Foundation Code of Conduct