Closed (fixed)
Project:
Bootstrap Styles
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 May 2021 at 07:13 UTC
Updated:
10 Aug 2023 at 10:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
n.ghunaim commentedComment #3
n.ghunaim commentedComment #4
n.ghunaim commentedComment #5
n.ghunaim commentedComment #6
mahmoud-zayed commentedHi @n.ghunaim,
Would you explain why we need to add that class?
Thanks,
Mahmoud
Comment #7
mahmoud-zayed commentedComment #8
n.ghunaim commentedHello @mahmoud-zayed,
I needed it to add specific styles when having background image.
Regards,
Noor
Comment #9
n.ghunaim commentedComment #10
drupgirl commentedHi, thanks for this attempt. This patch did not apply when attempting to apply to the latest version of dev.
I assume the purpose of the class is for adding an overlay tint to the background image, as described in this issue, https://www.drupal.org/project/bootstrap_styles/issues/3163894.
I can go with adding the background image and overlay tint via straight CSS, but it would be cool to get this operational, as most images need a tint so that the text pops.
Thanks.
Comment #11
rajab natshah#3244910: Add a specific class when having background bg-color, bg-image, bg-video options
Comment #12
rajab natshahComment #13
rajab natshahComment #14
rajab natshahA patch for the latest 1.0.x-dev committed code
Comment #15
rajab natshahA patch for the committed bootstrap_styles-1.0.3 tag release
Comment #16
rajab natshahComment #17
drupgirl commentedThank you, the patch for bootstrap_styles-1.0.3 applied and a class can be added to a section with a backround image. However this is also possible by applying a "container wrapper classes".
My particular goal is to be able to add a linear gradiant over the background image, but this is not possible because the image is added using background-image and not background.
What would be ideal is being able to get the following result:
background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url(/sites/default/files/file.jpg);
What we currently get with either method:
<div class="class-banner tint white _none" style="background-image: url(/sites/default/files/image.jpg); background-position: center top; background-repeat: no-repeat; background-size: cover;">So my issue is outside of the scope of this issue and more inline with the issue in https://www.drupal.org/project/bootstrap_styles/issues/3163894, where it looks like they specifically had a background image overlay at some point in time.
Thanks for your help!
Comment #18
abu-zakham commentedRe-roll patch #15
Comment #19
qusai taha commentedFix issue when adding background color the class bg-color adding, but when deleting the color the class will not remove.
patch to fix the issue on 1.0.x
Comment #20
qusai taha commentedFix issue when adding background color the class bg-color adding, but when deleting the color the class will not remove.
patch to fix the issue on tag 1.0.3
Comment #21
rajab natshahComment #22
rajab natshahDo not use this patch.
Not sure, when I removed the
"$build['#theme_wrappers'][$theme_wrapper]['#attributes']['style'][] = $background_image_style;"It had got mixed with other issue #3299909: Fix Layout Builder section rendering original Background Image when no background options, no image styles, or lazy loading are applied
which to be fixed in the next stage.
Comment #23
rajab natshahRe-roled the patch to work with
1.1.0Comment #24
rajab natshahComment #25
guido_sThx Rajab, #23 works for me on 1.1.0 and helped a lot with styling!
Comment #28
rajab natshahComment #29
rajab natshahComment #30
rajab natshah✅ Released bootstrap_styles-1.1.1
Comment #31
rajab natshah