Recently I've got in to this website, and found couple of totally cool designs, but in some of them, in the CSS part there is a snippet of code for importing like this ;
#import url(http://fonts.googleapis.com/css?family=Montserrat);
Whenever, I copy this in to my own CSS file, it ends up with an error saying ;
Imported style sheets are not checked in direct input and file upload
mode ( level 0 )
Does anyone have any idea what's the issue?
You're just trying to validate your CSS file using the W3C validator, and it's letting you know that it's not going to validate the imported style sheet (Google's). It's not an error, just some information for you.
Related
I’m new to Bootstrap. Using version 3.
I’m using a "custom.css" file to customize the design of my website.
The problem I’m seeing is that none of my customizations work unless I put "html" at the beginning of the relevant line.
When I put html at the beginning of a line, the change does take effect, so I know the file is working.
Can anyone help with this? I’ve used custom css files before, and I’ve never seen this before.
you have to import CSS file to correct location at HTML file also please share your code for find solution quickly
I've got a huge HTML newsletter file, in which I am supposed to remove duplicate CSS rules, however all of the rules are inline based.
I've been searching all over the internet, but everything ( eg css lint ) seems to be for external css files.
Do you know about anything I can use for my case?
EDIT: okay, since I've got already 2 dislikes, I would reword it to: How would You approach this problem?
my approach would be to introduce a type of templating system for emails so you would be able to write in external css or sass files and the final build step would output the inline styles (using something like the "MJML - The Responsive Email Framework" or "Zurbs Foundation for Emails").
I just figured out that some filenames will cause problems when writing Less.
I had a file names "checkboxes.less" that wouldn't import. After renaming it everything works as intended.
My guess is that some names are reserved for javascript variables or functions but I can't find a list of them.
Would anyone have a list of forbidden keywords in Less.js ?
EDIT : When viewing the style editor, checkboxes.less is not imported. No error is shown in the console.
EDIT 2 : File structure image
EDIT 3: Also doesn't work on confirm.less
When importing a less file use it like this, not like the css:
#import "library"; // library.less
#import "typo.css";
my theme uses a dynamic css file 'custom-style.php' which is included through wp_enqueue_style();
This file includes some styles depending on the theme options (colors,fonts,...)
On some installation there is no access to this file. Trying to access the file via the source code gets a "500 Internal Server Error". Changing file permissions to 777 does not solve it.
How can I solve this? Is there any other possibility to create dynamic css files?
Alternatively I could write a function to include this css in the head of the html but this is not the way I want go. There are some lines of css and I don't like css in html output.
This problem is from the server and is related to the server configuration. You can put your css code in variable and use the file_put_contents function to put your css code into the style.css file.
Like the code below
<?php
$customColor = #fff;
$css_code = "body{ background:{$customColor}; }";
file_put_contents('style.css',''); //First we empty the file
file_put_contents('style.css',$css_code);//Transfer Css code to file
I used this method and it was a good solution
I've been target for someone used to copy my website style sheet so this time i would like to protect my css file using the following :-
i will create fake.css and inside it will put the following code based on #import url
#import url("css/real.css");
Now if he view source will only see the above line and will try to call
www.my_site.com/css/real.css
but i will indeed using my hosting panel will not allow direct access to files .css
Now my question, Is it save enough or still he can get the code by using firebug or whatever !? ~ thanks
There is no way to hide CSS from your users.