Rubymine css code completion does not work - css

Simple html file with attached css file. Code completion does not work. (inline css does)
I've spent lots of hours trying to figure it out. Hope this will save some time for those who are still struggling. See the answer below.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<link rel="stylesheet" href="style.css">
</head>
<body>
</body>
</html>

Autocompletion will not work if Code Insight feature is disabled.
So my problem was with the big css file. Actually, it's a regular size file (tailwind css processed by postcss with autoprefixer plugin).
Css file was around 3MB, but code insight stops working for files that bigger than 2.5MB by default.
The solution is to increase filesize limit.
Go to Help > Edit Custom Properties
Paste config
# Maximum file size (kilobytes) IDE should provide code assistance for.
idea.max.intellisense.filesize=10000
Save and restart

Related

why the sass codes don't apply to my html

p{
color: blue;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="sport.scss">
</head>
<body>
<p>Helllooo</p>
</body>
</html>
I wrote two other pages in this project correctly. But, when intended to code the third one, changes didn't apply at all.it seems that my html code doesn't receive the styles.
Surprisingly, the sass file fully converted to CSS file, and no problem was evident.
SASS / SCSS is a preprocessor for CSS, and can't be interpreted by your browser.
This is a duplicate question and possible solutions have alredy been described here: Attaching a SCSS to HTML docs
if you are using vs code download a sass extension which will convert your sass code into a css code and then you can link that css file generated by the extension to your html page
i will recommend scss-to-css extension by yutent as it doesn't require you to make it active like other extensions
you must read documentation sass official and follow this guide https://sass-lang.com/guide. if you not install sass this two way how install sass
read this https://sass-lang.com/install
or download extension in visual code
if you are still confused change your sass become sport.css

Only some TailwindCSS classes work after installation

I just installed TailwindCSS and would like to learn about it. After some problem-solving during installation, I meanwhile had no more warnings in the installation process, but when now trying in VSCode some of the first examples from the Tutorial, some of the Tailwind classes used in the HTML file can be applied and have an effect in the browser, while others seemingly cannot be applied and have no effect in the browser.
Could anyone please help me, what needs to be done to make the TailwindCSS installation fully work and be able to make use of all Tailwind classes?
For example, this very first example from the tutorial on the Tailwind homepage works correctly for me and the button is correctly shown in blue and gets darker, when hovering over it in my browser (MacOS, Safari):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="tailwindout.css" />
</head>
<body>
<button class="bg-sky-500 hover:bg-sky-700">
Save changes
</button>
</body>
</html>
But one of the next examples in the tutorial on the homepage has no effect and the selected text is not shown in fuchsia color in my browser (MacOS, Safari), neither when calling the html file with live server from VSCode nor when directly opening the html file in the browser from the Mac Finder:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="tailwindout.css" />
</head>
<body>
<div class="selection:bg-fuchsia-300 selection:text-fuchsia-900">
<p>
So I started to walk into the water. I won't lie to you boys, I was
terrified. But I pressed on, and as I made my way past the breakers
a strange calm came over me. I don't know if it was divine intervention
or the kinship of all living things but I tell you Jerry at that moment,
I <em>was</em> a marine biologist.
</p>
</div>
</body>
</html>

reactjs navbar design proglem(using bootstrap css internally)

I have a problem with the navigation bar,
I have a navigation bar for my project. As you can see my code below if I use the link and get it from an external source it is working well. But there is a problem for me when the net is a bit slow I can see the navigation's loading on my screen. it is a very small duration but it disturbs me very much. So I decided to use CSS source from my project folder but could not do that. I tried many code samples but could not do it correctly. If somebody helps me, I will appreciate it. Thanks.
I am also still trying to solve it but I wanted to get some help.
function MyNavBar(params) {
//console.log(params["conpanyID"]);
return (
<div>
<head>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
/>
</head>
1-When I use link/external source
[1]: https://i.stack.imgur.com/SO5qB.png
2-When I use CSS file from my project folder.
[2]: https://i.stack.imgur.com/MqHqo.png
you might have linked your stylesheet inside the body instead of the header section , because of which your page will load first, then your CSS
here is an example
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>file</title>
<link rel="stylesheet" href="css/s.css">
<link rel="icon" href="css/si.ico">
</head>

Path to the CSS file in the header generated by IntelliJ is incorrect

I'm running a node.js project on localhost that I created with IntelliJ idea, and overall, it seems to work fine on Chrome from a usability standpoint. However, the CSS files don't resolve so I'm not getting any styles. Using the developer tools on Chrome, I can see that it can't find them. But it sure seems like they are there to me.
However, the main problem that I see is that headers are being added to the handlebars files which contain one of the broken shortcuts. Anyone know where in IntelliJ this is coming from? I tried adding the header info but it just is creating duplicate information.
The first set of info is the one that isn't coming directly from the file I created. I'm just not sure where it's coming from.
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel='stylesheet' href='/stylesheets/style.css' />
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel='stylesheet' href='style.css' />
</head>
</html>
I eventually figured it out - the problem is in the Express code setup that I had. The express setup defined a "static" file location for the public directory, so the trick to is to start the path with "/Static", like this
<link rel='stylesheet' href='Static/stylesheets/style.css' />
Then it finds it and I'm good to go!

Font Awesome class "fa-check" is not displaying check mark

I have a simple html page using font awesome css. Can anyone see why my font awesome check mark is not displaying, I cannot get the check mark to display and I cannot seem to figure out why.
I am using the .min.css link in my <Head> as such:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>LoopLAB Theme</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
</head>
When I want to inject it into a <i> element in the DOM, I simply use this:
<i class="fa fa-check"></i>
As you can see above, the check mark does not display. Do you see anything obvious that I am doing wrong? This seems like a beginner's error but I can't find the problem.
Check your CSS. There are a few ways you can do that!
Simply check if font-awesome.min.css is indeed under your CSS folder. If it is, check your folder structure. Can your HTML access this folder using css/font-awesome.min.css? The CSS folder must be a child from the folder you are currently storing your HTML file. Finally, are you using the latest version of font-awesome-min.css? This specific icon might not be included in your CSS file if it's an older version.
Inspect your site using your favorite browser inspect tool and locate your CSS file on inside the inspector. Clicking on it should open your CSS code. The code should be minified. If there is nothing inside of it or some kind of error your website is failing to find your file on your server or computer.
Plus you can also add from a CDN, for example, https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css and import directly to your code.

Resources