Skip to content
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

Doesn't play nicely with text transformations. #13

Closed
acleancoder opened this issue Nov 13, 2011 · 4 comments
Closed

Doesn't play nicely with text transformations. #13

acleancoder opened this issue Nov 13, 2011 · 4 comments

Comments

@acleancoder
Copy link

Resizing on items that have 'font-weight:lighter; letter-spacing: 0; text-transform: uppercase' produces strange resize results.

e.g.

.js_bigtext { width: 100%; margin: 22px 0 0 0; }
h1 { display: block; width: 100%; font-weight: lighter; letter-spacing: 0; text-transform: uppercase; }
<div class="js_bigtext">
    <h1>Title Here</h1>
</div>
$('.js_bigtext').bigtext({
    childSelector: '> h1'
});
@etuan
Copy link

etuan commented Apr 11, 2012

It would be ideal if the resizing happened after the css was applied... I'm having the same issue.

@philfreo
Copy link
Contributor

philfreo commented Apr 7, 2013

👍

@philfreo
Copy link
Contributor

philfreo commented Apr 7, 2013

Interesting... it works in some cases for text-transform: uppercase;, but not all.
Screen Shot 2013-04-07 at 3 52 36 PM

    <header>
        <h1>Test Test Test</h1>
        <h2 style="text-transform:uppercase;">Foo Foo</h2>
        <h2>Foo Foo</h2>
    </header>
    <script>
        BigText.DEFAULT_CHILD_SELECTOR = '> *';
        $('header').bigtext();
    </script>

If I apply the text-transform directly on the <h2> then it works correctly, but if I rely on a style tag to capitalize the h2 (.jumbotron header h2 { text-transform: uppercase; }) then it gets sized too large.

@zzarazza
Copy link

I was going to bang my head against the wall over this, but the suggestion to move text-transform: uppercase to the element directly, without any cascade, worked like a charm. I didn't have to put it as inline style too, just added an ID to the element that was big-texted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants