-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace-text-pe mixin - text showing in IE9 #4
Comments
Do you know which extendable is being called? |
Hi Snugug, here is the code I'm using. Perhaps I'm doing it wrong? It's a svg with png fallback that should display the h1#site-name inline. $global: 'global';
@include sprite-map-generator($global);
#site-name {
margin:1.6rem auto 0;
text-align:center;
@include replace-text-pe($global, 'logo-color');
// opera repeats svg even with this declared
background-repeat:no-repeat;
@include breakpoint($medium, $no-query: '.lt-ie9') {
float:left;
margin:1.6rem 1.4rem 0 0;
text-align:left;
}
} I guess I really don't understand how the extendables work. Are they used so that someone like me can redeclare those mixins using my own text-replacement methonds instead of using the compass text replacement? |
The extendables are there in an effort for the output of the mixin to be as DRY as possible, no end user stuff needed. If you'd prefer to use the squish text method, do the following: @include replace-text-pe($global, 'logo-color', $inline-element: true); For sake of better namespacing, I'm going to change $inline-element to something like Additionally, your LTIE9 isn't going to work. REM units aren't supported in LTIE9: |
Thanks, that worked. I also had to do @include squish-text on the anchor Thanks for the heads up on the rems, I was hoping to replace all instances On Fri, Nov 2, 2012 at 8:13 AM, Snugug notifications@github.com wrote:
|
I was going to add a similar rem mixin to Toolkit, now I may just include that one. Good to know that already exists. Either way, you just said something that makes this all make much more sense, and I can explain exactly what was wrong before for you. So. while you were doing a replace text on the Also, I'm going to close this now that you've got this working. |
Yes, that make sense. I will try that. Here is some similar alternatives to that rem mixin if your interested:
|
FYI.. I ended up using https://github.com/SimonWpt/rem which is a fork of https://github.com/bitmanic/rem that adds support for strings and colors. I couldn't understand how to configure https://github.com/ry5n/rem when using the 10px increments trick: html{
font-size:62.5%;
}
body{
@include rem(font-size, 14px);
} should output the following but didn't: html{
font-size:62.5%;
}
body{
font-size:14px;
font-size:1.4rem;
} Let me know if you come across something better. |
Hi Snugug,
I've been using the @mixin replace-text-pe, but then I noticed that in IE9 it shows the text on top of the image.
I noticed that h5bp changed their image replacement technique h5bp/html5-boilerplate@aa0396e to use http://nicolasgallagher.com/another-css-image-replacement-technique/
So I thought maybe I could try that new technique after seeing https://github.com/Snugug/toolkit/blob/master/compass/stylesheets/toolkit/_pe.scss#L235, but I don't know how to extend those mixins.
Could you show me an example of how to extend those mixins to use a different image-replacement technique? I'm referring to %replace-text-pe-squish and %replace-text-pe-hide
Thank you
The text was updated successfully, but these errors were encountered: