-
Notifications
You must be signed in to change notification settings - Fork 8
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
Big ideas clear inline css #4
Comments
Hey @guidoferreyra! On resize, does it seem like the performance is poor because nothing is happening quickly, or does the page actually slow down in some way? The script only runs once every 500ms on resize to try and avoid performance issues. This is set here: https://github.com/kennethormandy/big-ideas-text/blob/master/src/big-ideas-text.js#L51 My plan was to allow users to set their own value per #3, which I can implement sooner rather than later if you really need it. The inline styles approach shouldn’t interfere with adding your own styles…if you can give me a simple example that shows the issue you are having, I can take a look. I’m not sure I understand the context right now. Glad you’re using the project, and thank you for the Glyphs plugins you’ve been releasing! |
The page slow down the resize, but is not my major problem the page Im building Is a heavy. Don't worry about this. In my code with a button I'm adding OT features. and when BI is triggered they are cleared. But here a reduced test case. I've inlined in the first line the color blue and you will see how the color is removed when BI is loaded. You are welcome, glad to hear that the plugins are useful for you. :) |
Thanks for the test case, it makes figuring things out way easier. You could either modify the OT features on a span inside the Big Ideas Text list items: <ol id="first">
<li><span style="color: blue">First</span></li>
<li>Second</li>
<li>This is the Third</li>
<li>Fourth</li>
</ol> Or just use classes instead, and toggle those with JS (In the case of OT features, I use this approach with Utility OpenType): .blue {
color: blue;
} <ol id="first">
<li class="blue">First</li>
<li>Second</li>
<li>This is the Third</li>
<li>Fourth</li>
</ol> Would either of those options work? Classes are preserved on |
Kenneth, I find that spanning all the lines in my case, could not be the best option. I'm building a tester. Once I tried to implement features with classes but with not success because one feature erase the other. With your approach I could use multiple features on the same line? Edit.
Thanks again, really appreciate your help. |
I’m still testing if there are any side effects before I merge this into master, but the change in #5 should fix things for you I think. Utility OpenType will allow you to add multiple classes for OpenType features at once, and I’ve made it support the widest range of browsers possible through the I would still recommend applying inline styles to the parent element of BigIdeasText or a If you’re using npm to install the package, you should be able to run: npm install --save kennethormandy/big-ideas-text#ko-4 Otherwise, just try including this version of the file instead. |
Hi again! Unfortunately the new version of the script produce an strange error that impede the click function on the element. For instance the content editable attribute is not working. I don't know how to describe better the issue for helping you. |
I have an older example of using Big Ideas Text and the content editable attribute on the moriston.losttype.com site. It’s open source, not open license, but feel free to follow that example if it’s helpful. I tried running the site with the updated version of Big Ideas Text I sent you and it didn’t cause any issues. |
Thank you I will take a look to my code. Also the code you sent me is very helpful for me it teaches me a lot about how to write js. I suck on JS! Thanks Regards! |
Kenneth!! Yesterday I found what was happening with my page. Thanks for all your help, I think the last version you sent me can be merged safely to main branch :) Regards |
Hi Kenneth!
I find a little bit problematic that Big Ideas clean all inline styles, because I use other functions to style the text, color, OT features, etc and when Big ideas is triggered on resize i.e all get clear.
Could you guide me to solve this?
Another little thing. I've a approximately 10 instances of BI on my page and when I resize the performance is poor and this is understandable it's a lot of computing. What can you suggest me to improve a little bit the performance?
Thanks in advance, Big Ideas is great!
Regards.
The text was updated successfully, but these errors were encountered: