https://git.drupalcode.org/project/bootstrap_storybook/-/blob/3.1.x/src/...
it will miss the node-type class when in preview mode.
can do this:
if (($node = \Drupal::routeMatch()->getParameter('node')) || ($node = \Drupal::routeMatch()->getParameter('node_preview'))) {
if ($node instanceof NodeInterface) {
// Add node ID body class.
$variables['attributes']['class'][] = 'node-' . $node->id();
// Add content type machine name body class.
$variables['attributes']['class'][] = 'node-type--' . str_replace('_', '-', $node->bundle());
}
}
This is only fix for this class in body tag, not sure somewhere still need do the same thing. I used this toppest class and be able to find this issue.
Not sure how fork works in drupal gitlab, looks like not really convenice.
Comments
Comment #3
doxigo commentedComment #5
doxigo commentedAlso another good catch, thanks