Skip to content
Snippets Groups Projects
Commit 720837ab authored by Ivica Puljic's avatar Ivica Puljic Committed by Ivica Puljic
Browse files

Issue #3085223 by pivica: When core switch to claro we should switch to btn-danger

parent 13cc3ba2
No related branches found
Tags 8.x-1.0-beta4
No related merge requests found
......@@ -528,6 +528,14 @@ function bs_bootstrap_form_alter(&$form, FormStateInterface $form_state, $form_i
};
$elements_enable_floating_labels($form);
}
// Make entity forms delete link.
$build_info = $form_state->getBuildInfo();
if (isset($form['actions']['delete']['#type']) && $form['actions']['delete']['#type'] === 'link' && !empty($build_info['callback_object']) && $build_info['callback_object'] instanceof \Drupal\Core\Entity\EntityForm) {
// Remove button and button-danger classes, add link delete classes.
$form['actions']['delete']['#attributes']['class'] = array_diff($form['actions']['delete']['#attributes']['class'], ['button', 'button--danger']);
$form['actions']['delete']['#attributes']['class'] += ['btn', 'btn-link', 'text-danger', 'link-icon', 'action-delete'];
}
}
/**
......
@charset "UTF-8";
.sr-only {
position: absolute;
width: 1px;
......@@ -398,6 +399,10 @@ button.bg-dark:focus {
padding-right: 0.66667rem;
}
.link-icon.action-delete::before {
content: "";
}
@media (min-width: 576px) {
.text-sm-left {
text-align: left !important;
......
......@@ -20,4 +20,8 @@
}
}
}
&.action-delete {
@include bs-icon-var($fa-var-trash-o);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment