I am learning PWA on magento 2. I trying to add my static block and custom.css file into home page but it not working. So anybody have solution help me apply all my custom css content into homepage.


import React from 'react';
import cmsBlock from "@magento/venia-ui/lib/components/CmsBlock";
import defaultClasses from './custom.css';

const HomePage = props => {
    const content = cmsBlock({"identifiers": "sale-block"});
    return (
        <div className={defaultClasses.blocks_promo}>{content}</div>
export default HomePage;


.blocks_promo {
    margin-bottom: 16px;
    background: red;
.blocks_promo .info{
    display: block;
    color: red;
:blobal(.block-promo-wrapper) {
    float: left;
    width: 50%;

Now I see class .blocks_promo is affecting but class .block-promo-wrapper is not. Thanks ALl

1 Answer 1


Its seems like keyword mistake :

:global(.block-promo-wrapper) {
    float: left;
    width: 50%;

Replace global keyword in your css.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.