SASS box-shadow Mixin crashing Internet Explorer 8 - ruby-on-rails-3

I'm using SASS with Rails 3.2.3 and Ruby 1.9.3 in RVM.
My issue is that, for one reason or another, my SASS box-shadow mixin causes Internet Explorer 8 to crash on page load, no error from IE, just completely closes. If I remove the mixin, it opens perfectly...The mixin looks like:
#mixin boxShadow($params) {
-moz-box-shadow: $params;
-webkit-box-shadow: $params;
box-shadow: $params;
}
I have this at the top of my application.scss
#import 'mixins';
I'm using the mixin as such:
#include boxShadow(0px 1px 3px #999);
Any idea why this could be happening?

Turned out to be an old version of respond.min.js blowing things up!

Related

Vuetify not picking up styl changes

Trying to update style so that buttons are rendered with capitalised case instead of all uppercase.
vue --version is 3.5.5
Added src/stylus/main.styl
$button-text-transform = 'capitalize'
#require '~vuetify/src/stylus/app'
main.js includes:
import "./stylus/main.styl"
Problem is that the text in buttons is still uppercase:
Chrome inspect shows style:
.v-btn {
text-transform: uppercase;
}
Is there anything else I need to do for the app to pickup the styl?
EDIT:
Changed main.styl to:
#import '~vuetify/src/stylus/app'
$button-text-transform = 'capitalize'
#import '~vuetify/src/stylus/main'
Still all uppercase
In the end after investigating webpack and vue-cli all I was able to do was add to App.vue:
<style>
.v-btn {
text-transform: none;
}
</style>

Unexpected token '.' when bundling stylesheets with MVC 4

BundleConfig.cs
bundles.Add(new StyleBundle("~/Content/styles").Include(
"~/Content/css/test.css"
)
);
_Layout.cshtml
#Scripts.Render("~/Content/styles")
Test.css
body{
font-size: 75%;
color: #232323;
text-align: left;
margin: 0px;
padding: 0px;}
This is what Chrome shows as being loaded giving me a Syntax Error about an unexpected token { :
body{font-size:75%;color:#232323;text-align:left;margin:0;padding:0}
I would've selected Abi's answer for the link he provided, but it was a comment rather than an answer. So, I'm posting this as the answer to ensure this question is marked as resolved.
Basically, the link Abi provided stated that the reason for the error is that the browser was trying to load css as though it was javascript.
I realized right away that I was using #Scripts.Render() and should've been using #Styles.Render() instead.

why display css code in the content in Safari of question2answer system?

I installed question2answer on my mac and i login by Safari and ask a question, after posted the question, i view the question, there is a strange line in the content:
next_pages_container { width: 5px; hight: 5px; position: absolute; top: -100px; left: -100px; z-index: 2147483647 !important; } test question
but it works fine if i use Chrome.
I think this code line is a css code, i don't know why it's display in the content.
Anybody can help me? thanks.
Apparently, it is a bug in "Evernote Web Clipper" for Safari:
http://discussion.evernote.com/topic/26375-help-clipper-injects-clearly-html-into-my-pages/
The clipper inserts the code in all editable areas. The suggested workaround is to disable the clipper.

How to change css styles of Google Plus Pages Badge?

I configuring standart badge on https://developers.google.com/+/plugins/badge/config
For it Google+ rendering iframe content.
How i can change classes styles inside iframe?
At this time it seems there is currently no way to do it. I tried editing the CSS to get rid of the annoying border and white background:
.yeb {
background-color: none !important;
border: 0px solid gainsboro !important;
}
But since the CSS is in the Google server you can't override the iFrame. It is a current feature request in the Google forums.
You can do a little trick:
The HTML for the iframe:
<div id="social_gplus_circle">
<div id="social_gplus_circle_inner"><g:plus href="https://plus.google.com/105379671042990608528" size="smallbadge"></g:plus></div>
</div>
The CSS for the trick:
#social_gplus_circle{overflow: hidden;width: 105px;height: 45px;padding-top: 7px;}
#social_gplus_circle_inner{overflow: hidden;position: relative;top: -20px;left: -130px;height: 50px;width: 276px;}
iframe{display: block!important;}
I did not made this myself, I got it from a google forum.
You can't change it , because the google plus code is not on your server.
You can only modify the iframe CSS , if your page and the iframe code is on the same server.

Background size not working in Opera Mini despite Modernizr thinking it should

I am using Modernizr to detect whether browsers support the CSS3 property background-size for a mobile site I'm building.
I'm testing the site in the Opera Mini 6 Simulator on the official Opera website, and Modernizr detects that the browser supports background-size and adds the class 'backgroundsize' to the <html> element accordingly.
However when I then use the background-size property in my CSS it is not supported.
Here's the head:
<script src="modernizr.js" type="text/javascript"></script>
<style>
body {
background:url('background.gif') no-repeat 0 0 #FFF;
}
.backgroundsize body {
-o-background-size: 100% auto;
background-size: 100% auto;
}
</style>
And the body content
<p>Content</p>
<script>
if (Modernizr.backgroundsize == true) {alert("Background size is supported");}
</script>
I am expecting the single background image to be stretched across the full width of the browser, instead it repeats; the page can be seen here - http://so.ajcw.com/mobile.htm
I guess one of five things has happened - does anyone know the reason and can offer a solution?
Modernizr does not work properly and has given a false positive
Opera Mini 6 incorrectly tells Modernizr it supports background-size when it doen't
The simulator is not an accurate emulation and the real Opera Mini does support background-size
I have written my code incorrectly
Or something else?
background-size is not supported in Opera Mini
I wrote this as a quick work around:
var isOperaMini = (navigator.userAgent.indexOf('Opera Mini') > -1);
if(isOperaMini) {
var root = document.documentElement;
root.className += " opera-mini";
}
It add's a class "opera-mini" to the html element. Therefore you can target Opera Mini. An example below:
.icon {
background-image: url("icon-social.svg");
background-size: 32px;
}
html.opera-mini .icon,
html.no-svg .icon {
background-image: url("icon-social.png");
}
See more at: http://anthonydillon.com/blog/#sthash.VUV1hIy2.dpuf
It seems things have changed. For my Opera Mini 7.5 on Android.
Modernizr.backgroundsize == true;
And it responds correctly to percentage values as well as to cover and contain.
#anthony's answer doesn't work as it's not resetting / removing the background-size property for Opera Mini. The correct way to do this is:
.class {
-o-background-size:cover;
-background-size:cover;
}
x:-o-prefocus, .class {
-o-background-size:;
background-size:;
}
The x:-o-prefocus targets just Opera browsers.