Override container.html.twig template for a specific context I would like to override the container.html.twig template but the twig debugging tool doesn't give any suggestion. 

I tried to add suggestion following https://drupal.stackexchange.com/a/249565/85029 answer but I end up with the suggestion being container----.html.twig.

The context is a display field with an embed view in a node.

I guess, the solution might be pretty close from what I have now (using the suggestion hook) but I'm not able to have some satisfying suggestion.

My current hook is

function mytheme_theme_suggestions_container_alter(&amp;$suggestions, array $variables) {
  $element = $variables['element'];

  if (isset($element['#type']) &amp;&amp; $element['#type'] == 'view') {
    $suggestions[] = 'container__' . $element['#name'];
    $suggestions[] = 'container__' . $element['#name'] . '__' . $element['#display_id'];
  }

  if (isset($element['#type']) &amp;&amp; $element['#type'] == 'container' &amp;&amp; isset($element['children']['#type'])) {
    $suggestions[] = 'container__' . $element['children']['#type'];
  }
}


Edit : 

Ended up with something corresponding to my expectations by adding 

if (isset($element[0]) &amp;&amp; $element[0]["#theme"]) {
    foreach ($element[0]["#theme"] as $themElem) {
        $suggestions[] = 'container__' . $themElem;
        }
}
I just did this a month ago for the same reason:

/**
 * Implements hook_theme_suggestions_container_alter().
 */
function mytheme_theme_suggestions_container_alter(&amp;$suggestions, array $variables) {
  $element = $variables['element'];

  if (isset($element['#type']) &amp;&amp; $element['#type'] == 'view') {
    $suggestions[] = 'container__' . $element['#name'];
    $suggestions[] = 'container__' . $element['#name'] . '__' . $element['#display_id'];
  }

  if (isset($element['#type']) &amp;&amp; $element['#type'] == 'container' &amp;&amp; isset($element['children']['#type'])) {
    $suggestions[] = 'container__' . $element['children']['#type'];
  }
}


This will work for Views and general types. It is coming up blank because you need to handle it a little differently depending on whats being rendered.

Then in my twig file I am just doing:

{{ children }}

because I didn't want wrapping divs.