Score:-3

Avoid adding custom CSS to a node editing form?

km flag

Situation

  • custom module adding styles
  • don't add styles to node editing form

How to avoid adding the style to the editing forms?

function crossfade_page_attachments(array &$page) {
  $page['#attached']['library'][] = 'crossfade/crossfade';
}
Score:0
km flag

Currently discovered answer derived from the metatag module)

function crossfade_page_attachments(array &$page) {
  if (\Drupal::service('router.admin_context')->isAdminRoute()) {
    return FALSE;
  }
  $page['#attached']['library'][] = 'crossfade/crossfade';
}
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.