What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi all, I posted this issue a while ago, but here we go again (sorry, don't want to annoy you all, j

ULL0N440J
ULL0N440J Posts: 184 πŸ§‘πŸ»β€πŸš€ - Cadet
edited October 2019 in Help

Hi all,
I posted this issue a while ago, but here we go again (sorry, don't want to annoy you all, just trying to figure out, where it could come from - today I got to this topic again and found out): All of my own css-classes and id's are loaded 66 times (didn't find anything which could explain this specific number)

My project/public/Yves/assets/css/yves_default.app.css is about 6MB big at 50.000 lines. I guess it is likely that it actually should be less than 1000 Lines.

How many lines does your file have? Are some elements there mutiple times? πŸ€”

Comments

  • ULL0N440J
    ULL0N440J Posts: 184 πŸ§‘πŸ»β€πŸš€ - Cadet

    Found this thread, too: https://sprykercommunity.slack.com/archives/CKJRJM5FG/p1568383690070300

    Just wanted to know, if someone else had this before, too. Would it be helpful to just move the shared.scss?

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    apparently one of our projects has 22.5k lines in that file. Another has "just" 7k

  • ULL0N440J
    ULL0N440J Posts: 184 πŸ§‘πŸ»β€πŸš€ - Cadet

    With nearly same amount of css?

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    one project has 22.5k another project 7k (the other project is older)

  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet

    don't know anymore though, just looking πŸ™‚

  • ULL0N440J
    ULL0N440J Posts: 184 πŸ§‘πŸ»β€πŸš€ - Cadet

    Does this appear to be correct to you? Don't know if you did a ton of css πŸ˜„
    You could easily check this by scrolling through developer tools of your browser. body tag is already loaded that often in my case

  • ULL0N440J
    ULL0N440J Posts: 184 πŸ§‘πŸ»β€πŸš€ - Cadet
  • UKGT7RC7P
    UKGT7RC7P Posts: 538 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    body { is only defined once in the yves_default.app.css file

  • Aleksander Kovalenko
    Aleksander Kovalenko Sprykee Posts: 45 πŸ§‘πŸ»β€πŸš€ - Cadet

    It looks like something is wrong with shared.scss. Everything is in this file is used by webpack sass-resources-loader and will be added to every endpoint. So by design only variables/functions/mixins definitions should be included into shared.scss.

  • ULL0N440J
    ULL0N440J Posts: 184 πŸ§‘πŸ»β€πŸš€ - Cadet

    Good hint @UN6T8SEM7 - There was a @import '~ShopUi/styles/shared'; hiding in the shared.scss.

    That's probably importing the shared.scss over and over again.. And this would even match at frontend:yves:build : Scanning for component styles... 64 found

  • ULL0N440J
    ULL0N440J Posts: 184 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited October 2019

    I actually thought that the shared.scss is the place to go whenever you want to do any css changes.

  • Aleksander Kovalenko
    Aleksander Kovalenko Sprykee Posts: 45 πŸ§‘πŸ»β€πŸš€ - Cadet

    You can take a look into the frontend documentation to understand better where to put your code https://documentation.spryker.com/front-end_developer_guide/yves/atomic-frontend.htm#sass-layer

  • ULL0N440J
    ULL0N440J Posts: 184 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thank you @UN6T8SEM7 πŸ™‚

  • UKAGH1M33
    UKAGH1M33 Posts: 3 πŸ§‘πŸ»β€πŸš€ - Cadet

    The linked issue in your 2nd comment in the thread is still outstanding I believe, and is something in vendor πŸ™‚