Occasionally when I open up Firefox in an ASP.NET MVC 4 project, I get warnings like:
Validation (CSS 3.0): "\9" is not a valid value for the "width" property.
When this happens, "\9" is inserted into the .css file in totally random places. For instance,
.carousel-inner > .item > a > img {
display: block;
width: 100% \9;
max-width: 100%;
height: auto;
}
This forces me to manually delete all instances of "\9" from the .css file. What's going on?
\9 is a "CSS hack" specific to Internet Explorer 7, 8, & 9.
Reference
Related
I have long Msg and they are the same except the last part. As you can see below - i can't tell the difference: - they are actually different.
I've open up the debugger with chrome and i saw this:
But this doesn't work on page reload as you might expect. It reverts back to 30 ch.
Question:
Where are this styles kept? So that by modifying them i always have this debugger-sidebar at 70 ch.
Or is there a better way to do this?
Node: It would be even better if i can make it resizable instead of fixed at 70 ch. But this is enough for now.
You are not alone, there is a Github issue for this.
As #Simon H pointed out this is not fixed yet . But until then - to have a resizable debugger-sidebar you can do this:
Go into:
elm-stuff/packages/elm-lang/VirtualDom/Debug.elm
Do a search for the class: .debugger-sidebar
and then add:
.debugger-sidebar {
display: block;
float: left;
width: 30ch;
height: 100%;
color: white;
background-color: rgb(61, 61, 61);
/* add this 2 lines */
overflow-x: auto;
resize: horizontal;
}
It works on save with elm-live also. But if you delete the elm-stuff folder for some reason it will get back to normal - because elm-stuff is build on the fly.
I've taken this from #rtfeldman pull-request here
Hope that helps:)
EDIT:
There has been some improvements recently (model stays open during updates.. awesome !!:D ) and stuff was moved around. If you want this:
My gif recorder only does 600px - can't record the hole thing. To change the styles:
step 1. go to:
elm-stuff/packages/elm-lang/virtual-dom/ < your version number ex 2.0.4 > /src/VirtualDom/Debug.elm - and open up Debug.elm
step 2.
Find styles function, and inside, locate:
#debugger {
width: 100%
height: 100%;
font-family: monospace;
display: flex; -- add display flex here.
}
step 3. find:
.debugger-sidebar {
display: block;
float: left;
width: 30ch;
height: 100%;
color: white;
background-color: rgb(61, 61, 61);
width: 30%; -- add this 3 lines - maybe you want more width then 30%.
overflow-x: auto;
resize: horizontal;
}
Don't delete elm-stuff folder - if you do all this steps need to be done again.
For webpack users.
And also make sure you restart webpack build after doing this - because webpack-dev-server is working form the unchanged elm-stuff folder in memory - and will not pick up this change without a restart.
I'm using Prestashop for a a project but it doesn't display correctly in the mobile version. I managed to find out that it's to do wth the grid system and I think I can amend the global CSS file to include the stack overflow?
As far as I can tell it's a set size.
I don't know any coding so if you could help me that would be much appreciated.
/* columns */
#columns {
overflow: hidden;
background: url(../img/black/columnsBg.jpg) repeat-x;
padding: 0 0 10px 0;
text-align:center;
}
.columnsInner {
width: 980px;
margin: 0 auto;
text-align:left;
}
if you use the prestashop default theme means its not responsive. so you can try prestashop mobile theme.
go to "Preferences > Themes"
under this you will have a option called "Enable the mobile theme."
you can enable your options there.
try this and let me know.
I am new to bootstrap, and I added bootstrap 3 into my project and it shrunk all the font sizes, I never had any font size specified in these classes. I thought bootstrap 3 had the default size to 14.. is there something else I need to do?
Thanks
It appears to be happening, at least as of version 3.3.6, due to this block on line 1097:
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
You can restore your font-size by adding this to your stylesheet:
html
{
font-size: 100%;
}
You can customize/override anything - if, for example, you load YOUR css file AFTER the bootstrap file, then your settings will override it. Whatever you can dream:
p {
font-size 18px;
}
and so on...
I strongly recommend digging into the source code: https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css
html {
font-size: 62.5%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.428571429;
color: #333333;
background-color: #ffffff;
}
UPDATE: TO clarify, "No" you shouldn't have to do anything else. It sounds like there is another problem. The linked source code has changed since the original answer date... as of Feb 2015, it looks like this:
html {
font-size: 10px;
}
body {
font-size: 14px;
}
Assuming we've set our project up correctly, (bower install bootstrap is pretty easy)... attempting to echo text outside of the body should result in 10px text, inside body should be 14px.
If you don't see 14 point text inside the body, then something else might be stepping on it. I'd next inspect in in Chrome (for example) to confirm where the font-size was coming from.
I'd like to add that I think it's helpful to understand how these values we see in this /dist/css file are derived from less variables... the defaults should work out of the box, but you have easy control over everything, including the body text size: see http://getbootstrap.com/css/#less-variables.
I've made simple application with dojo.
I took the exact same combo tree (cbtree) and put it once inside accordion and once first on page.
I don't understand why inside the accordion I get different cbTree (it looks really bad)
Here is online example of the problem :
http://77.235.53.170/cbTree/cbTree.htm
The problem is at your main.css, you have
#leftCol img {
width: 100%;
}
Which overwrites
.dijitFolderOpened, .dijitIconFolderOpen, .dijitIconError {
background-image: url("../../icons/images/commonIconsObjActEnabled.png");
width: 16px;
height: 16px;
}
You need resolve this in main.css by either removing your style, or changing it to a more specific rule; i.e. instead of #leftCol img, use #leftCol .yourClass.
How should I go about optimizing CSS code? There's various CSS3 lines, like -moz- and -webkit-, border-top-left-radius, etc.. I believe bigger CSS files increase page load time significantly.
And another question: I've written quite some code, however some of it is left unused. I have over 2000 lines of CSS code, and I bet around 200-300 lines could be removed, perhaps even more. Is it worth revising all the code? It would take quite some time...
GZip the files before uploading them on server
It will reduce the files size significantly
Edit: Effect of GZipping -
By gzipping the .css file on Bargaineering, its size dropped from 28.2K to 7.3K, a 74.1% savings.
always remove the last semicolon:
body { background: black; color: white; }
to
body { background: black; color: white }
combine multiple properties:
.class { margin-top: 10px; margin-right : 20px; margin-bottom: 30px; margin-left: 40px; }
to
.class { margin: 10px 20px 30px 40px; }
use simple colors (instead of `#FFFFFF, #AABBCC, #FF0000 put #FFF, #ABC, #F00)
the most important thing: minify your code before uploading on the server. It will remove whitespaces and comments and significantly reduce your code and file size.
The smaller the file, the quicker it will download and the faster users can render the styles. There are various minifying scripts, I'd check out the YUI Compressor: http://refresh-sf.com/yui/