C
C
classicartt2022-04-14 16:47:02
Web development
classicartt, 2022-04-14 16:47:02

Why does the file not see css styles?

The jsx file launched on the localhost does not see the styles at all. Although everything is indicated in the code, and the styles are spelled out. Also in the file tree, the file with styles is highlighted in green and vs code writes that the file is not tracked. I'm using the less preprocessor. What to do?
I am attaching a screenshot from the browser inspector.
625825ad2010c291180115.png

also a piece of code from jsx file.

<div className={styles.header}>
                <div className={styles.items_head}>

                    <h2 className={styles.item_name}>
                        OnFind
                    </h2>

                    <h2 className={styles.item_title}>
                        Оформление заказа
                        <img src={require("../img/sell.svg")} alt="" />
                    </h2>

                </div>
            </div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sigar49, 2022-04-14
@Sigar49

Just use + also with all elements In css<div class="/*CLASSNAME*/"></div>

./*CLASSNAME*/ {
    /*tags*/
}

+ and don't forget to check if the file name matches with (if you don't use

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question