bootstrap 5 icons and pseudo elements - bootstrap-5

I think when bootstrap was using Glyphicons, you could change your font to Glyphicons Halflings and then use the ::before pseudo element to display a unicode character before every list item. A unicode character that looked a little better than the default, like the pencil for example.
See this StackOverflow question here
Q: Can you use bootstrap 5's icons with css pseudo elements? Maybe Glyphicons is open source and so I could download it separately from bootstrap.

Related

trix editor image alignment

I have a blog site and am using the trix editor but I would like to have the images float either left or right and have the text wrap around them. I have searched all over looking for a solution and cannot imagine why image alignment is not included. I'm sure it is possible with css but but I cannot figure it out.
Trix 1.3.1 doesn't support this, but there is an open PR, https://github.com/basecamp/trix/pull/791 (May 2020)
One commenter published a fork of trix that adds align-center and align-right buttons to the toolbar.

Can I change the text color of one link on a page that has been created by a script code?

I am using a code on my blog that is contained within <script> </script> tags, that when looking at the page, creates a link. My overall blog code sets a color for all links but I want this link to be a different color than all the rest.
I tried using a few different methods of changing the text color and even of changing the link color but nothing I tried worked.
It's hard to see what you are doing wrong without seeing your code, but basically all you will need to do is set the color of your link with the style attribute when inserting the HTML, something like style="color:red".
Assuming you are using pure JavaScript and your script looks something like this, this will give you a red link:
document.getElementsByTagName('body')[0].innerHTML +=
''This is red!'';
If you are using jQuery your script may look something like this:
$('This is red!').appendTo($('body'));
Inline styles have the highest priority of all CSS so these will override any other CSS you may have.
Leave a comment and update your question with your code if this doesn't help you, and I will try to improve this answer!

Froala editor not working (icons)

I'm using Froala editor (the free version) and I have the problem that I can't see any icons on the formating buttons.
Is there any way to fix it? Thanks!
You're not including Font Awesome correctly or if you have simply opened a HTML file using the file protocol the icons don't appear in Firefox (see Fonts Not Showing https://froala.com/wysiwyg-editor/browsers).
It is best to include Font Awesome like on https://github.com/froala/wysiwyg-editor/blob/master/examples/basic.html#L6 in order to avoid all the issues above.

Getting a dual range slider working with twitter bootstrap

I'd like to use this upgraded jQuery Mobile dual range slider.
jQuery Mobile dual range slider working but buggy
I need to use it with twitter bootstrap. However, jQuery Mobile doesn't play nice with Twitter bootstrap and is killing the dropdown menu when the javaScript files are placed at the bottom of the page (as per yslow). Here are 3 jsbin examples to illustrate the problem:
with jQuery Mobile added, twitter bootstrap menu fails:
http://jsbin.com/ibecox/1
without jQuery Mobile .js file, twitter bootstrap the menu works fine:
http://jsbin.com/ibecox/2
with all javaScript in the header (bad practice) the menu also works, but I'd need to avoid putting all the javaScript in the header:
http://jsbin.com/ibecox/3
I can see there's a broken link to the twitter bootstrap js, I've fixed it and your sample works fine for me, both the dropdown menu and the progress bar
If all you're trying to do is get jquerymobile's Range Slider to work with Bootstrap, you can use the Custom Download tool to download just the slice that (sort of) makes the Range Slider work.
What you get is unfortunately incomplete, and above all it doesn't self-initialize, so you'll need to do that manually:
$('div[data-role=rangeslider]').rangeslider();
And you'll need to apply some styles of your own to make up for a bit too much being left out in the custom download. But you will get Range Sliders without breaking Bootstrap.
The cause of the Bootstrap break when you use all of jquery mobile is more complex. The Init module applies a ton of classes all over your code, in particular .ui-btn to buttons. That's the main thing that blows up Bootstrap - the nav menu uses a button tag, and that tag gets that problematic class applied, and then in come all the problem styles from jquerymobile.
The hackier way to solve that in the large is to just use jquerymobile without the Init module then Init only what you need - hopefully their buttons aren't one of those things. The best way to solve it is pretty intense: Improve jquerymobile so that there's either no conflict with Bootstrap ever, or, some sort of special noBSconflict() method or something you can run that avoids applying classes that will break Bootstrap but otherwise proceeds as normal.

jquery ui icons

I am working with jquery ui and their icons.
My icons looks like this (except I have another theme): jquery ui icons chart
But I found this site with a set of nice icons which I would like to use (srcroll down to the bottom of the page): Michael Keck
Can these icons be found and downloaded somewhere? Do they belong to the jquery ui framework or are they customized and only exists on this site?
He's essentially created his own theme with that set of icons. That's the beauty of the jQuery UI CSS framework, it specifies a list of icons and you can choose to overwrite them without having to change any of your HTML markup or JS code.

Resources