locked
a quick modular scss questions RRS feed

  • Question

  • User1034446946 posted

    hi

    just out of interest do you recommending having global classes like bootstrap and then adding the modules as an addition,or do yor mainly have mixins and have one class for an element and add the mixins to the modular class?

    so bootstrap class would be class=btn btn-primary addition-modular-elements

    or

    class = special-modular-button

    also when you have pageswhich are the same like CRUD index pages do you have a general scss for all pages and then if needed a module as well?

    Monday, July 13, 2020 1:03 PM

All replies

  • User348806598 posted

    Hi,

    If you are looking for adding individual scss file on every view, you can transpile each scss file into individual CSS file and you can try adding RenderSection for CSS in the layout page 

    <head>
        <title>@ViewBag.Title</title>
        @RenderSection("css", false)
    </head>

    And then in individual view, you can add the individual CSS file reference-

    @section css {
        <link href="@Url.Content("~/css/module.css")" rel="stylesheet"/>
    }
    Monday, July 13, 2020 2:27 PM