• Resolved rvnd

    (@rvnd)


    Hi
    Congratulations of a very well thought out plugin.
    I was about to comment about no documentation for the content-grid block, then found there’s a section called “Bootstrap Strips (Beta)” with a number of undocumented blocks. I expect that you will be releasing docs when the feature is final?

    So I’ll comment my other issue instead.
    In the interests of not duplicating code, it would be great to be able to use the plugin’s bootstrap colours (e.g. $primary) within our theme’s CSS as var(–primary) etc. Any thoughts on this?

Viewing 1 replies (of 1 total)
  • Plugin Author Miles

    (@areoimiles)

    Hi @rvnd

    Thank you for reaching and I’m glad to hear you like the plugin!

    Yes, some more documentation will be released over the next few months for the beta blocks along with a few new blocks we are working on.

    In regards to using the Bootstrap colours within your theme CSS, Bootstrap adds a number of properties to the :root of the page. You can see an example on this screenshot:
    https://areoi.io/wp-content/uploads/2022/11/bootstrap-vars.png

    By inspecting the page I can see the following variables are available:

    
    --bs-blue
    --bs-indigo
    --bs-purple
    --bs-pink
    --bs-red
    --bs-orange
    --bs-yellow
    --bs-green
    --bs-teal
    --bs-cyan
    --bs-white
    --bs-gray
    --bs-gray-dark
    --bs-primary
    --bs-secondary
    --bs-success
    --bs-info
    --bs-warning
    --bs-danger
    --bs-light
    --bs-dark
    --bs-font-sans-serif
    --bs-font-monospace
    --bs-gradient
    

    So, the easiest way to make use of the primary colour for example would be to add something like the below to your theme CSS. This should work with any of the Bootstrap colours, you will just need to change var to the relevant Bootstrap property from the above list.

    
    .my-class {
         color: var(--bs-primary);
    }
    

    I’m going to mark this as resolved as this should solve your issue but if it doesn’t or you have any other issues please don’t hesitate to get back in touch.

    Thanks again for reaching out and using our plugin.

    Miles

    P.S: if you like our plugin and are happy with the support we have provided, we would really appreciate it if you could take a few seconds to leave us a positive review.
    https://www.ads-software.com/support/plugin/all-bootstrap-blocks/reviews/#new-post

Viewing 1 replies (of 1 total)
  • The topic ‘Colours as css variables?’ is closed to new replies.