CSS intellisense not working

5 posts, 2 answers
  1. Joel
    Joel avatar
    112 posts
    Member since:
    Sep 2013

    Posted 23 Aug 2019 Link to this post

    Hi

      For some unknown reason, the intellisense suddenly stops working.

      When i create a new asp.net core project using telerik's wizard, it is working ok.

      I am using VS2017 with asp.net core R2 2019.

    <environment include="Development">
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.common-bootstrap.min.css" />
        <link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.metro.min.css" />

     

  2. Martin
    Admin
    Martin avatar
    317 posts

    Posted 28 Aug 2019 Link to this post

    Hello Joel,

    Thank you for the provided screenshots. We are currently discussing what might be causing the reported behavior and a possible solution. I will follow you up shortly.

    Regards,
    Martin
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Answer
    Martin
    Admin
    Martin avatar
    317 posts

    Posted 28 Aug 2019 Link to this post

    Hello Joel,

    In order for the intellisense to work correctly, you need to load the css file (kendo.bootstrap-v4.css) containing all the Kendo classes locally:
    <link href="~/css/kendo.bootstrap-v4.css" rel="stylesheet" type="text/css" />

    Please try doing this to see if it will resolve the issue. Attached you will find the file so that you can include it in your css folder. Note that the attached file is minified, although it does not have .min in its name.

    Regards,
    Martin
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. Joel
    Joel avatar
    112 posts
    Member since:
    Sep 2013

    Posted 28 Aug 2019 in reply to Martin Link to this post

    Hi Martin,

      Yes. That works.

       Do i need to add the <link> reference at <environment exclude="Development"> in _Layout.cshtml?

       If i need to do so, please share an example on how to do that.

       Thanks.

    <environment include="Development">
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
          <link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.bootstrap-v4.css" />
        
    <link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.metro.min.css" />
        <link rel="stylesheet" href="~/css/styles.css" />
    </environment>
     
    <environment exclude="Development">
              asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
              asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute"
              crossorigin="anonymous"
              integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" />
     
              asp-fallback-href="~/lib/kendo-ui/styles/kendo.metro.min.css"
              asp-fallback-test-class="k-theme-test-class"
              asp-fallback-test-property="opacity" asp-fallback-test-value="0" />
    </environment>
  5. Answer
    Martin
    Admin
    Martin avatar
    317 posts

    Posted 02 Sep 2019 Link to this post

    Hello Joel,

    Attached you will find a sample project demonstrating how to configure your <environment exclude> tag. Note that I have removed the reference to kendo.metro.min.css file as it will load a different theme (not the Bootstrap V4):
    <environment include="Development">
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="~/lib/kendo-ui/styles/kendo.bootstrap-v4.css" />
        <link rel="stylesheet" href="~/css/styles.css" />
    </environment>
     
    <environment exclude="Development">
              asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
              asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute"
              crossorigin="anonymous"
              integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" />

              asp-fallback-href="~/lib/kendo-ui/styles/kendo.bootstrap-v4.css"
              asp-fallback-test-class="k-theme-test-class"
              asp-fallback-test-property="opacity" asp-fallback-test-value="0" />
        <link rel="stylesheet" href="~/css/styles.css" />
    </environment>

    This is how the environment tags should look like in your project based on the paths to the files I see from your code snippet.

    I hope this will help you. Feel free to ask if you need further assistance.

    Regards,
    Martin
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top