How to use PhpStorm to autocomlete style sheets - editor

I'm using PhpStorm for a Bootstrap project.
Is there any way to make PhpStorm autocomplete get and predict CSS classes from external file without linking this file to the edited file?
Or any way to select stylesheet file and make PhpStorm use its' classes inside whole project without linking this CSS file to the edited file?

In HTML templates/partials completion includes selectors from all project stylesheets - unless you have some styles explicitly linked/embedded in your partial via <link> or <style> tag. See https://youtrack.jetbrains.com/issue/WEB-2223 and linked tickets.
Vuejs templates will be treated differently since 2017.2 - see https://youtrack.jetbrains.com/issue/WEB-25767

Related

Tailwind CSS for ASP.NET Core MVC

I have been going through all kinds of tutorials they are either just straight up not useful or they are using previous versions of VS and/or ASP.NET.
How do you install tailwind CSS on an MVC project?
I wish they had published the lib for everyone to copy and paste in their resource file and use it freely.
How do you install tailwind css on a MVC project? I wish they had published the lib for everyone to copy and paste in their resource file and use it freely.
You can try to include tailwind css from CDN, like below.
<link href="https://unpkg.com/tailwindcss#^2/dist/tailwind.min.css" rel="stylesheet">
Besides, you can try to finding client-side libraries and add the required files to your project through the Add Client-Side Library dialog.
I've created this package that's adding a new build action.
You simply set the PackageReference and set the build action of your stylesheet to TailwindCSS. During the build process, the stylesheet will be converted via PostCSS.
For more details, you can take a look at its GitHub repo.

Intellij says Vaadin flow lumo theme css variables not found

Then working on my new Vaadin 14 based application Intellij cannot find the built in lumo theme variables...
These variables exist at runtime in my browser, but where can I point Intellij to see them?
It looks like it's not possible, at the moment, unfortunately.
The problem is that starting from V14 styles you want to reference are packaged as.js files, but styles are written in .css. For example, if in V13 you could import them in your template like this Sizing and spacing:
<link rel="import" href="bower_components/vaadin-lumo-styles/sizing.html">
This would be the current way in V14 instead, which is a js file:
<script type=“module”>
import “#vaadin/vaadin-lumo-styles/sizing.js”;
</script>
So you can use those custom variables in your styles without problems, as long as you load an appropriate js module on your page (like this #JsModule(value="#vaadin/vaadin-lumo-styles/sizing.js") Lumo), but I haven't found a way (and not sure there is one) to make Intellij aware of them.
So the underlying problem is that you can't import a variable from a js file into a css file.

How to add themeroller custom theme to my website?

I have created a custom theme using Jquerymobile.com themeroller.
A mobile website which i have created using default theme values like .js and .css folders.
Now i want to change that theme of my website to my new custom theme,created using themeroller.
How to include those files to my coding?
When you download the themerolloer that you create, there is a sample index.html file that uses the theme that is enclosed. Look at that to see what files need to be included in your page, but more importantly, look at that code to see what CSS classes are being used - no point in including them in your page if you aren't using using the Themeroller classes
You can see all the steps, and a full tutorial on the Getting Started page

JQuery UI MVC3 - Mapping of Downloaded ZIP and Already existing files(css, .js, images)

I am using ASP.NET MVC3. Adding a web project, it gives me all the files required for jquery to run.
It gives me Content Folder and some folders for storing css and Images.
It also gives me Scripts folder, where I can have my .js files.
Whenever I want to download some custom JQUERY UI controls, It gives me a zip file which has different folders and scripts.
How do I map them so that, I am not keeping too many jquery files in my project.
For example, I want to use DatePicker Jquery UI, I go to jquery site and download them and it gives me a ZIP File which has various folders.
There is folder called development again it has got all the files.
If I wan to go for timepicker, I think there is only a CSS difference between timepicker and datepicker.
Timepicker needs slider. So I am not sure do i need to reference jqueryslider.js in my Layouts file.
Please shed some light on this mapping of downloaded files and already existing files in MVc3?
if have to include new Jquery UI Control, What should be the changes, is it just in .js file, images folder, or css folder.
I personally think its only css and images, please correct me.
Thank you.
All you need to do is add the content in the js folder to the scripts in your Scripts folder and copy everything from the css\\ folder into the Content folder of your MVC application.
Once you have done this, you simply add the following references to the _Layout file in your Shared folder (just modify to match your version of JQuery and the correct version of your JQuery-UI download):
<link href="#Url.Content("~/Content/jquery-ui-1.8.18.custom.css")" rel="stylesheet" type="text/css" />
<script src="#Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery-ui-1.8.18.custom.min.js")" type="text/javascript"></script>
Just remember to keep the reference to your JQuery library (jquery-1.7.1.min.js in the example above) before the reference to the JQueryUI scripts.
-- Kindly mark as the answer if this has been helpful

How can I change jslint(VS 2010 extension) to ignore files?

I have js lint installed in Vs 2010 as a extension through the extension manager.
It finds lots of errors but they are all from external plugins or from the jquery library. I am not going to go and fix stuff in an external plugin or jquery file. So how can I get it to not check these files?
I am also wondering how can I get it to ignore checking href links. I am using asp.net mvc so my links are like this
reg
So it can't find this path as it is the path to the controller action method not a file. So how can I get it to not look at these?
Thanks
You can exclude files (external plugins, jquery, etc.) from the JSLint validation process.
From here.
For the href issue, if you don't have any JS in your views, you could exclude those as well using the method above.

Resources