Skip to content
Snippets Groups Projects
Commit 80fdce6a authored by Justin Toupin's avatar Justin Toupin
Browse files

Update styles for image radios

parent a729faa3
No related branches found
No related tags found
No related merge requests found
.image-radios__item label.option {
flex-direction: column;
}
.image-radios__item-image {
margin: 0
}
.image-radios__item-image img {
margin: 0;
}
.image-radios__item {
flex-basis: auto;
margin-left: 0 !important;
}
......@@ -7,3 +7,8 @@ style_options:
dependencies:
- core/once
- core/jquery
image_radios:
css:
component:
build/css/image-radios.css: {}
......@@ -73,6 +73,7 @@ function _mercury_editor_style_options_expand_component_types(&$types) {
foreach ($definition['options'] as $key => $option) {
if ($key !== $definition['default']) {
$new_types[$bundle . '__' . $key] = $info;
$new_types[$bundle . '__' . $key]['id'] = $bundle . '__' . $key;
$new_types[$bundle . '__' . $key]['label'] = $option['label'];
$new_types[$bundle . '__' . $key]['url'] .= (strpos($info['url'], '?') !== FALSE ? '&' : '?') . $option_id . '=' . $key;
$new_types[$bundle . '__' . $key]['link_attributes'] = clone($info['link_attributes']);
......@@ -107,3 +108,8 @@ function mercury_editor_style_options_preprocess_layout_paragraphs_builder_contr
}
function mercury_editor_style_options_library_info_alter(&$libraries, $extension) {
if ($extension == 'image_radios' && isset($libraries['image_radios'])) {
$libraries['image_radios']['dependencies'][] = 'mercury_editor_style_options/image_radios';
}
}
.image-radios__item label.option {
flex-direction: column;
}
.image-radios__item-image {
margin: 0;
& img {
margin: 0;
}
}
.image-radios__item {
flex-basis: auto;
margin-left: 0 !important;
}
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