Quantcast
Channel: Bootstrap Blog
Viewing all 134 articles
Browse latest View live

Bootstrap 4.4.1

$
0
0

Today we’re shipping Bootstrap v4.4.1!

In v4.4.0, we added add() and subtract() functions to avoid errors when using zero values in CSS’s built in calc() function. While these functions work as expected with our build system, which is based on node-sass, some alert developers noticed that things broke when using another Sass compiler like Dart Sass or Ruby Sass. To resolve this issue, we’ve tweaked these functions a bit to output what we would expect.

Lastly, we also added a theming fix for some custom forms in a disabled fieldset.

<3,

@mdo& team


Bootstrap Icons Alpha 2

$
0
0

There’s a brand new update of Bootstrap Icons today with our second alpha release! We’ve updated nearly 20 icons and added over 100 new icons since our last release just a few weeks ago.

New icons

With over 120 new and updated icons, this is likely going to be our largest update before we our first stable release. We have some renamed icons, fixed bugs, new tools icons, new typography icons, tons of new arrows, and so much more.

New icons in Alpha 2

Highlights

Here’s a summary of what’s been fixed, updated, or renamed in this release. For a full summary of what’s new, head to the GitHub release or Alpha 2 pull request.

  • Fixed:
    • Bootstrap icon stroke now 1px instead of 1.5px
    • tv-fill icon no longer has graphical glitch
    • circle-slash icon strokes now connect
    • trash icons now use a single shape
    • trash-fill icon no longer has a gap between lid and bin
    • layout-split no longer has space between vertical divide
  • Updated:
    • blockquote icons now feature more legible quotation marks
    • command icon now 1px smaller, no longer sitting on half pixel
    • gear icons now have rounded corners
    • eye is now outline by default (use new eye-fill variant if needed)
    • redrew sound waves on volume icons
    • corrected (reversed) the direction of backspace icon
  • Renamed:
    • changed microphone to mic
    • existing expand/contract icons are now angle-expand and angle-contract

Get ‘em

Alpha 2 has been published to GitHub and npm (package name bootstrap-icons). Get your hands on it from GitHub, by updating to v1.0.0-alpha2, or by snagging the icons from Figma.

<3,

@mdo& team

Bootstrap Icons Alpha 3

$
0
0

While we continue to work on Bootstrap 5, I’ve been jamming away on the Bootstrap Icons library, continuing to create as many icons as time allows. Today marks the third alpha, and massive update to the project. We’ve officially crossed 500 icons!

We’ve cleaned up existing icons, created new permalink pages for each and every icon, and added hundreds of new icons—all in one release.

500+ icons!

I’ve added 221 new icons in our third alpha, the most ever in an alpha release thus far. And while I was drawing all these new awesome icons, I also cleaned up the existing ones by changing their viewBox size and redrew many to ensure more pixel perfect icons.

All Bootstrap Icons

Why change the viewBox? In the first two alphas, I was drawing icons on 20x20 artboards in Figma. This seemed like a good idea, but every icon was roughly 16x16, so it ended up being dead space. Now, every icon has been updated to eliminate the 2px inner padding, making the viewBoxs 0 0 16 16 instead of 0 0 20 20.

This change has some slight file size improvements, and should help with sizing and positioning as well.

Looking for a particular icon, but don’t want to download the entire project to snag the SVG source code? Need to send someone a link to an icon? Look no further than the new icon permalink pages!

From the Bootstrap Icons homepage, click any icon and you’ll be taken to a page dedicated to just that icon. It features the icon in various sizes and renders the source code like you’re used to seeing in Bootstrap’s docs.

Bootstrap Icons permalink

Since this is still an alpha, some features are still missing from our docs. This includes unlinked tags, no category listing, and no copy to clipboard. I hope to see those added before our stable v1.0.0 release. PRs are very much welcome if you’d like to contribute!

Download

Alpha 3 has been published to GitHub and npm (package name bootstrap-icons). Get your hands on it from GitHub, by updating to v1.0.0-alpha3, or by snagging the icons from Figma.

<3,

@mdo& team

Bootstrap 4.5.0

$
0
0

Bootstrap v4.5.0 has landed with dozens of bug fixes, some small new features, and some changes to our development. Originally planned as a v4.4.2 patch release, we’ve bumped this to a minor release on account of our new features that help bridge the gap between v4 and our upcoming v5.

Highlights

Here’s what you need to know about v4.5.0. Remember that with every minor and major release of Bootstrap, we ship a new URL for our hosted docs to ensure URLs continue to work.

  • New interaction utilities. Quickly set user-select with the new utilities and Sass map.
  • New Reboot style for pointer cursors. We now include a role="button" selector in Reboot to set cursor: pointer on non-<button> element buttons.
  • Examples are now downloadable. We’ve added a script to zip up and offer all our Examples as their own download from the docs.
  • Saved ~5% from the compressed minified JS builds.
  • Added guidance to our docs for how to work around our longstanding input group rounded corner bug.
  • Redesigned docs homepage and navbar to increment us towards v5’s new docs design.
  • Deprecated bg-gradient-variant mixin as it’s being removed in v5.
  • Updated to jQuery v3.5.1, Jekyll v4, and dropped Node.js < 10 for development.

We’ve shipped a lot more in this release, so be sure to check out the v4.5.0 GitHub release and the v4.5.0 project for closed issues and merged pull requests for more details.

Head to the v4.5.0 docs to see the latest in action. The full release has been published to npm and will soon appear on the BootstrapCDN and Rubygems.

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

<3,

@mdo& team

Bootstrap Icons Alpha 4

$
0
0

We’re closing in on 700 icons in Bootstrap Icons with today’s release, Alpha 4! We’ve spent some time under the hood of our build process to improve a few things, added tons of new icons, and fixed some bugs and inconsistencies.

We’ve shipped tons of new commerce icons for all your shopping cart needs, added tons of calendar options (I couldn’t settle on one design), tons of new shape arrows, and more.

~700 icons!

With 140 new icons in this release, we’ve almost hit 700 icons. We’re likely to fly by that in our next release, but in the meantime, have a look for yourself at the breadth of icons. Every icon has also been reprocessed to resolve SVGO issues that prevented them from being opened in some apps.

All Bootstrap Icons

Download

Alpha 4 has been published to GitHub and npm (package name bootstrap-icons). Get your hands on it from GitHub, by updating to v1.0.0-alpha4, or by snagging the icons from Figma.

<3,

@mdo& team

Bootstrap 5 alpha!

$
0
0

Bootstrap 5’s very first alpha has arrived! We’ve been working hard for several months to refine the work we started in v4, and while we’re feeling great about our progress, there’s still even more to do.

We’ve been focused on making the migration from v4 to v5 more approachable, but we’ve also not been afraid to step away from what’s outdated or no longer appropriate. As such, we’re very happy to say that with v5, Bootstrap no longer depends on jQuery and we’ve dropped support for Internet Explorer. We’re sharpening our focus on building tools that are more future-friendly, and while we’re not fully there yet, the promise of CSS variables, faster JavaScript, fewer dependencies, and better APIs certainly feel right to us.

Before you jump to updating, please remember v5 is now in alpha—breaking changes will continue to occur until our first beta. We haven’t finished adding or removing everything, so check for open issues and pull requests as you have questions or feedback.

Now let’s dig in with some highlights!

New look and feel

We’ve built on the improvements to our docs homepage in v4.5.0 with an updated look and feel for the rest of our docs. Our docs pages are no longer full-width to improve readability and make our site feel less app-like and more content-like. In addition, we’ve upgraded our sidebar to use expandable sections (powered by our own Collapse plugin) for faster navigation.

New Bootstrap docs layout

We’re also sporting a brand new logo! More on that when v5 goes stable, but suffice to say we wanted to give the ol’ B in a rounded square a small upgrade.

New Bootstrap logo

Inspired by the CSS that created the very beginnings of this project, our logo embodies the feeling of a rule set—style bounded by curly braces. We love it and think you will, too. Expect to see it roll out to v4’s documentation, our blog, and more over time as we continue to refine things and ship new releases.

jQuery and JavaScript

jQuery brought unprecedented access to complex JavaScript behaviors to millions (billions?) of people over the last decade and a half. Personally, I’m forever grateful for the empowerment and support it gave me to continue writing front-end code, learning new things, and embracing plugins from the community. Perhaps most importantly, it’s forever changed JavaScript itself, and that in itself is a monument to jQuery’s success. Thank you to every jQuery contributor and maintainer who made that possible for folks like me.

Thanks to advancement made in front-end development tools and browser support, we’re now able to drop jQuery as a dependency, but you’d never notice otherwise. This migration was a huge undertaking by @Johann-S, our primary JavaScript maintainer these days. It marks one of the largest changes to the framework in years and means projects built on Bootstrap 5 will be significantly lighter on file size and page load moving forward.

In addition to dropping jQuery, we’ve made a handful of other changes and enhancements to our JavaScript in v5 that focus on code quality and bridging the gap between v4 and v5. One of our other larger changes was dropping the bulk of our Button plugin for an HTML and CSS only approach to toggle states. Now toggle buttons are powered by checkboxes and radio buttons and are much more reliable.

You can see the full list of JS related changes in the first v5 alpha project on GitHub.

Interested in helping out on Bootstrap’s JavaScript? We’re always looking for new contributors to the team to help write new plugins, review pull requests, and fix bugs. Let us know!

CSS custom properties

As mentioned, we’ve begun using CSS custom properties in Bootstrap 5 thanks to dropping support for Internet Explorer. In v4 we only included a handful of root variables for color and fonts, and now we’ve added them for a handful of components and layout options.

Take for example our .table component, where we’ve added a handful of local variables to make striped, hoverable, and active table styles easier:

.table{--bs-table-bg:#{$table-bg};--bs-table-accent-bg:transparent;--bs-table-striped-color:#{$table-striped-color};--bs-table-striped-bg:#{$table-striped-bg};--bs-table-active-color:#{$table-active-color};--bs-table-active-bg:#{$table-active-bg};--bs-table-hover-color:#{$table-hover-color};--bs-table-hover-bg:#{$table-hover-bg};// Styles here...}

We’re working to utilize the superpowers of both Sass and CSS custom properties for a more flexible system. You can read more about this in the Tables docs page and expect to see more usage in components like buttons in the near future.

Improved customizing docs

We’ve hunkered down and improved our documentation in several places, giving more explanation, removing ambiguity, and providing much more support for extending Bootstrap. It all starts with a whole new Customize section.

Bootstrap 5 customize docs

v5’s Customize docs expand on v4’s Theming page with more content and code snippets for building on top of Bootstrap’s source Sass files. We’ve fleshed out more content here and even provided a starter npm project for you to get started with faster and easier. It’s also available as a template repo on GitHub, so you can freely fork and go.

Bootstrap 5 color palette

We’ve expanded our color palette in v5, too. With an extensive color system built-in, you can more easily customize the look and feel of your app without ever leaving the codebase. We’ve also done some work to improve color contrast, and even provided color contrast metrics in our Color docs. Hopefully, this will continue to help make Bootstrap-powered sites more accessible to folks all over.

Updated forms

In addition to the new Customize section, we’ve overhauled our Forms documentation and components. We’ve consolidated all our forms styles into a new Forms section (including the input group component) to give them the emphasis they deserve.

New Bootstrap 5 forms docs

Alongside new docs pages, we’ve redesigned and de-duped all our form controls. In v4 we introduced an extensive suite of custom form controls—checks, radios, switches, files, and more—but those were in addition to whatever defaults each browser provided. With v5, we’ve gone fully custom.

New Bootstrap 5 checks

If you’re familiar with v4’s form markup, this shouldn’t look too far off for you. With a single set of form controls and a focus on redesigning existing elements vs generating new ones via pseudo-elements, we have a much more consistent look and feel.

<divclass="form-check"><inputclass="form-check-input"type="checkbox"value=""id="flexCheckDefault"><labelclass="form-check-label"for="flexCheckDefault">
    Default checkbox
  </label></div><divclass="form-check"><inputclass="form-check-input"type="radio"name="flexRadioDefault"id="flexRadioDefault1"><labelclass="form-check-label"for="flexRadioDefault1">
    Default radio
  </label></div><divclass="form-check form-switch"><inputclass="form-check-input"type="checkbox"id="flexSwitchCheckDefault"><labelclass="form-check-label"for="flexSwitchCheckDefault">Default switch checkbox input</label></div>

Every checkbox, radio, select, file, range, and more includes a custom appearance to unify the style and behavior of form controls across OS and browser. These new form controls are all built on completely semantic, standard form controls—no more superfluous markup, just form controls and labels.

Be sure to explore the new forms docs and let us know what you think.

Utilities API

We love seeing how many folks are building new and interesting CSS libraries and toolkits, challenging the way we’ve built on the web for the last decade-plus. It’s refreshing, to say the least, and affords us all an opportunity to discuss and iterate. As such, we’ve implemented a brand new utility API into Bootstrap 5.

$utilities:()!default;$utilities:map-merge((//..."width":(property:width,class:w,values:(25:25%,50:50%,75:75%,100:100%,auto:auto)),//..."margin":(responsive:true,property:margin,class:m,values:map-merge($spacers,(auto:auto))),//...),$utilities);

Ever since utilities become a preferred way to build, we’ve been working to find the right balance to implement them in Bootstrap while providing control and customization. In v4, we did this with global $enable-* classes, and we’ve even carried that forward in v5. But with an API based approach, we’ve created a language and syntax in Sass to create your own utilities on the fly while also being able to modify or remove those we provide. This is all thanks to @MartijnCuppens, who also maintains the RFS project, and is responsible for the initial PR and subsequent improvements.

We think this will be a game-changer for those who build on Bootstrap via our source files, and if you haven’t built a Bootstrap-powered project that way yet, your mind will be blown.

Heads up! We’ve moved some of our former v4 utilities to a new Helpers section. These helpers are snippets of code that are longer than your usual property-value pairing for our utilities. Just our way of reorganizing things for easier naming and improved documentation.

Enhanced grid system

By design Bootstrap 5 isn’t a complete departure from v4. We wanted everyone to be able to more easily upgrade to this future version after hearing about the difficulties from the v3 to v4 upgrade path. We’ve kept the bulk of the build system in place (minus jQuery) for this reason, and we’ve also built on the existing grid system instead of replacing it with something newer and hipper.

Here’s a rundown of what’s changed in our grid:

  • We’ve added a new grid tier! Say hello to xxl.
  • .gutter classes have been replaced with .g* utilities, much like our margin/padding utilities. We’ve also added options to your grid gutter spacing that matches the spacing utilities you’re already familiar with.
  • Form layout options have been replaced with the new grid system.
  • Vertical spacing classes have been added.
  • Columns are no longer position: relative by default.

Here’s a quick example of how to use the new grid gutter classes:

<divclass="row g-5"><divclass="col">...</div><divclass="col">...</div><divclass="col">...</div></div>

Take a look at the redesigned and restructured Layout docs to learn more.

CSS’s grid layout is increasingly ready for prime time, and while we haven’t made use of it here yet, we’re continuing to experiment and learn from it. Look to future releases of v5 to embrace it in more ways.

Docs

We switched our documentation static site generator from Jekyll to Hugo. Jekyll has long been our generator of choice given how easy it is to get up and running, and its simplicity with deploying to GitHub Pages.

Unfortunately, we’ve reached two major issues with Jekyll over the years:

  1. Jekyll requires Ruby to be installed
  2. Site generation was very slow

Hugo on the other hand is written in Go, so it has no external runtime dependencies, and it’s much faster. We build our current master branch site, including the doc’s Sass -> CSS in ~1.6s. Our local server reloads in milliseconds instead of 8-12 seconds, so working on the docs has become a pleasant experience again.

The Hugo switch wouldn’t have been possible without Hugo’s main developer work, Bjørn Erik Pedersen (@bep), who made quite a few codebase changes to make the transition possible and smooth!

Also a shoutout to @xhmikosr who led the charge here in converting hundreds of files and working with the Hugo developers to make sure our local development was fast, efficient, and maintainable.

Coming soon: RTL, offcanvas, and more

There’s a ton we just didn’t have time to tackle in our first alpha that’s still on the todo list for future alphas. We wanted to give them some love here so you know what’s on our radar throughout v5’s development.

  • RTL is coming! We’ve spiked out a PR using RTLCSS and are continuing to explore logical properties as well. Personally, I’m sorry for taking so long for us to officially tackle this knowing all the effort that’s gone into it community efforts and pull requests to the project. Hopefully, the wait is worth it.

  • There’s a forked version of our modal that’s implementing an offcanvas menu. We still have some work to do here to get this right without adding too much overhead, but the idea of having an offcanvas wrapper to place any sidebar-worth content—navigation, shopping cart, etc—is huge. Personally, I know we’re behind the times on this one, but it should be awesome nonetheless.

  • We’re evaluating a number of other changes to our codebase, including the Sass module system, increased usage of CSS custom properties, embedding SVGs in our HTML instead of our CSS, and more.

There’s a ton yet to come, including more documentation improvements, bug fixes, and quality of life changes. Be sure to review our open issues and PRs to see where you can help out by providing feedback, testing community PRs, or sharing your ideas.

Get started

Head to https://v5.getbootstrap.com to explore the new release. We’ve also published this updated as a pre-release to npm, so if you’re feeling bold or are curious about what’s new, you can pull the latest in that way.

npm i bootstrap@next

What’s next

We still have more work to do in v5, including some breaking changes, but we’re incredibly excited about this release. Let the feedback rip and we’ll do our best to keep up with y’all. Our goal is to ship another alpha within 3-4 weeks, and likely a couple more after that. We’ll also be shipping a v4.5.1 release to fix a couple of regressions and continue to bridge the gap between v4 and v5.

Beyond that, keep an eye for more updates to the Bootstrap Icons project, our RFS project (now enabled by default in v5), and the npm starter project.

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

<3,

@mdo& team

Bootstrap Icons Alpha 5

$
0
0

Today we’re shipping our fifth and final alpha release of Bootstrap Icons. After today’s alpha release, we’ll be moving onto final touch ups of existing icons, closing out some more requests, and buttoning things up for a stable v1 release. Stay tuned!

1,000+ icons

This release adds nearly 300 new glyphs, taking us right past 1,000 icons. We’ve fleshed out all our calendar icons to add ranges and events, added a suite of new phone icons, added tons of new devices and hardware icons, dozens of badges, and so much more.

All Bootstrap Icons

As was the case with our previous alpha releases, not only do we have tons of brand new icons, but also dozens of fixes and refinements to existing ones. We’ve improved our paths to reduce icon file sizes, spending more time making things pixel perfect and with fewer vector hacks in our Figma files. In addition, we’ve updated our icon processing script to read the viewBox dimensions of each SVG individually to set their width and height. In future updates, this will allow us to create icons of various dimensions instead of our default 16x16.

New SVG sprite

In addition to hundreds of new icons, we’ve added a new bootstrap-icons.svg sprite. For those new to SVG sprites, it allows you to load a single asset and reference fragments of it across your project without inserting the entire HTML for the SVG.

Here’s a quick look at how it works once imported:

<svgclass="bi"width="32"height="32"fill="currentColor"><usexlink:href="bootstrap-icons.svg#heart-fill"/></svg><svgclass="bi"width="32"height="32"fill="currentColor"><usexlink:href="bootstrap-icons.svg#toggles"/></svg><svgclass="bi"width="32"height="32"fill="currentColor"><usexlink:href="bootstrap-icons.svg#shop"/></svg>

We hope to include some optimizations around this in the future as it’s our first endeavor into an SVG sprite system. Feedback and ideas are always welcome in our issues!

Coming in v1 stable

The single biggest feature coming in v1’s stable release will be icon web fonts. There’s a PR underway that requires further SVG path cleanup, as well as some tooling improvements. Overall it feels pretty promising!

While icon fonts are great for a handful of implementation reasons, please be aware that they are not inherently the most accessible option for your visitors. SVGs provide more control and styling options, and allow you to be accessible from the start with aria roles and <title>s.

If you have additional tips for how we can improve our icons, documentation, or tooling to be more accessible and approachable, don’t hesitate to share.

Beyond that, we’ll continue to clean up and improve existing icons and then aim to add a handful of new icons.

Download

Alpha 5 has been published to GitHub and npm (package name bootstrap-icons). Get your hands on it from GitHub, by updating to v1.0.0-alpha5, or by snagging the icons from Figma.

<3,

@mdo& team

Bootstrap 4.5.1

$
0
0

We’re shipping our latest patch release today to fix a handful of bugs in Bootstrap 4. While our focus remains on v5’s second alpha release (coming in the next couple weeks), we want to keep v4 as stable and reliable as possible.

Our next couple releases for Bootstrap 4 will continue this trend, focusing on bug fixes, documentation improvements, and (later on) features that help bridge the gap to v5.

Changes

Also available in the v4.5.1 release on GitHub.

CSS

  • #30808: Simplify list-group borders in cards
  • #30810: Add z-index to .custom-check to fix their rendering in CSS columns
  • #30817: Add border-radius to .card-img-overlay
  • #30830: Prevent conflicts with components with classes
  • #30922: Fix color on disabled checked state for custom controls
  • #30932: Restore word-break: break-word; on .text-break utility.
  • #30940: Prevent .row from shrinking in flex containers
  • #30957: Nullify custom form states’ box-shadow
  • #30959: Toasts in IE11
  • #30960: Fix IE11 validation tooltip alignment in input groups
  • #30965: Improve floating labels example in IE
  • #30966: Improve floating labels with Edge and a general refactor
  • #30969: Remove duplicated container breakpoints in compiled CSS
  • #30999: Revert min-width: 0 on .col due to unforeseen side effects
  • #31148: Remove duplicate properties on custom controls
  • #31165: Remove backdrop-filter from docs subnav and toasts
  • #31339: Add link to view docs pages on GitHub
  • #31347: Turn off scroll anchoring for accordions
  • #31381: Remove overflow: hidden from toasts

JavaScript

  • #30326: Prevent overflowing static backdrop modal animation
  • #30936: Add role="dialog" in modals via JavaScript
  • #30992: Avoid preventing input event onclick
  • #31155: Clear timeout before showing the toast

Build

  • #30797: Fix release script docs
  • #31011: Updated Babel config
  • #31296: Update to Ruby 2.7 and Bundler 2.x

Docs

  • #30809: Update docs callout for responsive SVG images
  • #30813: Mention Bootstrap Icons in extend/icons.md page
  • #30896: Improve wording on Downloads page
  • #30897: Prevent skip links from overlapping header in docs
  • #30957: Add .card-img-bottom example
  • #30973: Update some nav examples by removing .nav-item from .nav-link to be more consistent
  • #31070: Fix some broken examples and typos
  • #31135: Move color utility callouts to start of page
  • #31234: Clean up docs forms for accessibility
  • #31344: Mention toasts in the components requiring JavaScript page

Head to the v4.5 docs to see the latest in action. The full release has been published to npm and will soon appear on the BootstrapCDN and Rubygems.

Next up

We’ll be shipping our second alpha of v5 in the next few weeks. We’ve been a little delayed as we focus on ourselves during these unprecedented times and have all been taking a bit of time off here and there. We’re sorry to keep y’all waiting on v5 and hope you can understand.

After v5’s second alpha, we’ll be targeting a final alpha before our first beta, as well as more patches for v4. We’ll also be releasing the Bootstrap Icons soon. So stay tuned for more!

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

<3,

@mdo& team


Bootstrap 4.5.2

$
0
0

Today’s patch release is aimed at addressing some small issues introduced over the last few versions of Bootstrap 4. Read on for details and update when you’re ready.

From the addition of responsive containers in v4.4.0 to the most recent row and column adjustments, we had been making incremental changes to our grid system. While our changes have solved some issues, they’ve broken other behaviors and introduced new complexities.

Today’s release rolls back and restores a few things:

  • #31438 restores the make-container-max-widths mixin. We won’t be using the mixin ourselves, but it will remain in the codebase for the rest of v4 with today’s release. We’ve added a deprecation notice as well.

  • #31439 removes flex: 1 0 100% from .rows. This was added to address shrinking rows inside the navbar component after our responsive containers were added in v4.4.0. Removing this rolls us back to the expected grid and flex behavior—your row will shrink unfortunately without further changes. We could add extra custom CSS to address this, but it seems shortsighted to rush into that. Instead, apply .flex-fill to the .row and your row will behave as usual.

Similarly, v4.5.1 already removed the min-width: 0 on .cols. This change was introduced to fix <pre> elements not fitting to a column. This an issue with how flexbox works, where a flex container cannot shrink beyond its children’s content. Rather than force this on every column, we recommend you apply this as needed with a custom utility. (We’ll also aim to add this as a new utility in v5.)

We know this kind of hiccups set you back, so please accept our apologies for the bugs. Be sure to read the referenced pull requests above to get up to speed on what happened and how we fixed it. This CodePen demo has all the known grid issues and fixes implemented in it.

<3,

@mdo& team

Bootstrap Icons v1.0.0

$
0
0

After five alphas over the last nine months, Bootstrap Icons has officially gone stable with our v1.0.0 release! We’re now over 1,100 icons and are on track to add hundreds more in our upcoming minor releases. This has been a labor of love and I’m thrilled to ship this latest update.

Since our fifth alpha two months ago, over a third of our icons have been redrawn as we fine-tuned paths and shapes. Much of the redrawing and improvements here came as preparation for an icon font, but regrettably that’s been pushed back to a v1.1.0 release as the tooling for generating fonts from SVGs has proven more difficult to get right.

1,100+ icons

Our first alpha had just over 200 icons, and here we are with 1,120 icons in our first stable release. And we’ll only have more in future releases.

All Bootstrap Icons

Usage

If you’ve been following along these last several months, you’ll know Bootstrap icons are SVG based. That makes them super easy to import, customize, and extend—no matter the project. While they’re part of the Bootstrap family, they can be used anywhere. That’s because they’re released under the MIT license.

Use them as embedded SVGs, as external assets with <img> tags, as an SVG sprite, or even embedded in your CSS. Head to the docs to learn more.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

Up next

We’ll revisit the icon font hopefully in time for our next v1.1.0 release. In addition, there are already another 200+ icons drawn and plans for even more after. We’ll continue to fine-tune and iterate on these icons, so keep the feedback and requests coming.

<3,

@mdo& team

Bootstrap 5 Alpha 2

$
0
0

We’re back at it again with a brand new alpha release of Bootstrap 5! Our second alpha has brought some new and improved features, color contrast improvements, improved helpers and utilities, and some documentation design updates.

Check out the latest in the docs at https://v5.getbootstrap.com. Read the release notes for a full list of changes since Alpha 1. Our migration guide has also been updated with a new section for Alpha 2.

Updated docs nav

We’ve cleaned up the navigation in our docs to make things a little easier to use while on a mobile device or a narrow viewport. We’ve redesigned the main navbar to hide links on small devices, and when expanded, those navigation links now have larger tap targets.

Updated Bootstrap nav home

Our subnav has also be streamlined to take up a single horizontal bad on mobile, giving more space for documentation. We’ve also differentiated the expanding and collapsing menu icons between the two navs.

Updated Bootstrap nav docs

Together this should make it a little faster and easier to navigate our docs, and serve as a fun little demo for others.

Add .carousel-dark to any .carousel to switch from the default white text, controls, and indicators to black.

Example dark carousel

Values are configurable via Sass variables. To save on filesize, we’re using a CSS filter to invert out SVGs for the carouse controls. Pretty neat if you ask us!

Dark dropdowns

For the first time since Bootstrap v1 nearly nine years ago, we have dark dropdown menus! Add .dropdown-menu-dark to any dropdown menu to change the appearance. Dark dropdowns are opt-in, so you’ll need to add the class as you go.

Example dark dropdowns

We’d like to revisit some of this later in v5 with minor releases that advance dark mode throughout the entire project. Until then, enjoy the new classes!

Redesigned close button

Our close button has been renamed, redesigned, new focus state, and a new color option.

Example close button

We’ve renamed the class from the rather generic .close to .btn-close. In addition, we’ve dropped the use of &times; in our HTML for an SVG background-image via CSS. With updated styling all around, the close button has a clearer focus state and even an all-new white variant (also powered by a CSS filter).

Position utilities

Thanks to our contributors, we’ve added new directional positioning utilities. Quickly position an element with our new top, right, bottom, and left utilities with support for 0, 50%, and 100% by default.

Example position utilities

Combine with new translate utilities to center elements on an edge or corner, too! The new utilities are configurable and extensible thanks to the utilities API and some smart Sass map defaults.

More highlights

Some other incremental changes to a few components and changes include:

  • Container horizontal padding has been updated to match the row gutters variables and values.
  • Checkboxes and radios downsized to 1em from 1.25em for improved font scaling support.
  • Improved colors with green and cyan getting new values, plus higher contrast ratios all around.
  • Improved toast styling, now without overflow: hidden.
  • Badge padding increased a smidge.
  • Revamped “responsive embed” helpers, now called ratio helpers. New class names across the board, more flexible styles, and a new CSS variable for custom dynamic and responsive ratios.
  • Screen reader classes are now “visually hidden” classes.
  • New .border-width utility.

See all the changes in the v5 Alpha 2 project board and be sure to read the Migration guide for details on what’s changed since Alpha 1.

Coming in Alpha 3

We’ve pushed some additional breaking changes and important component updates to Alpha 3. To give you a heads up, here are some important upcoming moves:

  • Offcanvas support is coming thanks to new side modals!
  • We’re revamping the input group component, dropping support for quite a few variations. It’s too complex, supports too many variations, and has had the most annoying border-radius bug through all of v4. (I’m so sorry about that!)
  • We’re upgrading floating labels from a docs Example into a fully fledge form layout option, with support for textual inputs, selects, and textareas.
  • We’re adding font-size utilities and updating our font-weight utilities.
  • RTL is still coming! The PR is being reviewed by our team and we’re hoping to land it in Alpha 3 so we can get some folks testing with it.

For a more up to date list of changes, be sure to follow along with the v5 Alpha 3 project board. More docs improvements are planned with the potential for more breaking changes as well. From there it’s onto final breaking changes in Beta 3.

Release expectations

We’ll be alternating releases across v4 and v5 to keep the momentum up. We’re shipping v4.5.3 next and then moving right back to v5 for Alpha 3. We’ve noted our intended release schedule in our release repo. We’ll also keep updating that repo’s readme as we go.

Get started

Head to https://v5.getbootstrap.com to explore the new release. We’ve also published this updated as a pre-release to npm, so if you’re feeling bold or are curious about what’s new, you can pull the latest in that way.

npm i bootstrap@next

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

<3,

@mdo& team

Bootstrap 4.5.3

$
0
0

We’ve updated Bootstrap 4 with a new patch release to fix some bugs, backport some iterative changes from v5, and more. Enjoy!

As you may already know, we’re alternating between v4 and v5 releases to keep both versions moving in tandem. This helps us close the gap between v4 and v5 and make updating to v5 as easy as possible.

Read on for the highlighted changes.

Highlights

CSS

  • #31653: Add a comment to our escape-svg function to note that data URIs must be quoted.
  • #31693: Use the custom-control shadow variable instead of the generic input-focus-box-shadow.
  • #31793: Backport some v5 changes (improved th styling in Reboot, custom form field styling when printing, and improvements to .text-break).
    • #29714: Keep custom check, radio, and switch theme when printing.
    • #30781: Reboot’s th updates: Inherit font-weight: bold that comes from user agent stylesheets.
    • #30932: .text-break changes to drop overflow-wrap and use word-wrap once again
    • #31754: Improve versions page rendering (also reversed the order while I was here)
  • #31846: Backports the z-index change to .close buttons in dismissible .alerts.

JS

  • #31000: Avoid multiple change event trigger in buttons plugin. Not applicable to v5 since our button JS plugin has been mostly replaced with pure CSS.
  • #31673: Fix dropdown variable always evaluating to true.
  • #31696: Ensure hidePrevented.bs.modal can be prevented.
  • #31718: Backports new $dropdown-padding-x variable from v5.

Docs

  • #30811: Mention GPU acceleration fix in docs callout for popovers. Doesn’t apply to v5 since we’re updating to Popper v2.
  • #30838: Explain the dispose method more appropriately.
  • #31706: Backports updated margins for code snippets for improved readability.
  • #31769: Backports JS bundle guidance from v5.
  • #31851: Backports mention of missing to and nextwhenvisible methods.

Misc

  • #31297: Switch to xo ESLint config
  • Updated devDependencies versions

Next up

We’ll be back to v5 with our third alpha release coming in a couple of weeks. After that, we’ll ship another v4 update with v4.6.0 that continues the v5 backports and feature development. Please keep the feedback coming on what we can improve, how our releases are performing, and any other suggestions.

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

<3,

@mdo& team

Bootstrap Icons v1.1.0

$
0
0

Our first minor release for Bootstrap Icons is here, with over 30 new icons and a few bug fixes. New icons include fill variations for our emoji icons, including a few new emojis, and several new file type icons.

30+ new icons

Here’s a look at our file and emoji icons as of v1.1.0. New in this release for emojis are the wink and heart eyes, along with fill versions for the full set. In addition, we’ve added icons for Word, Excel, PowerPoint, and a general bar chart file type.

Emoji icons

File and folder icons

Changes

Here’s a more complete look at what’s changed in this release.

  • Fixed #415: Properly name grip-horizontal and grip-vertical
  • Fixed #423: Update arrow-up-square-fill
  • Fixed #437: Make file-earmark variations consistent
  • New: Added 18 filetype icons #465
  • New: Added 13 emoji icons #66

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

<3,

@mdo& team

Bootstrap 5 Alpha 3

$
0
0

Our third alpha release has landed with tons of updates to our components, utilities, docs, forms, JavaScript, and more. This is a larger alpha release for us and sets us up for our first beta where we’ll introduce some final breaking changes and features.

We’re trying to move fast and keep the future of the project and the web in general in mind, so this release is an important milestone for us. We’re balancing practical migration from v4 with meaningful changes that reflect the ever-changing front-end community.

We think you’ll love this release, so keep on reading and let us know what you think!

Components

We’ve improved a handful of components in this release, and even dropped one for some new and improved utilities.

New accordion

We’ve dropped the .card based accordion for a brand new .accordion component, solving several bugs in the process. Our new accordion still uses the Collapse JavaScript plugin, but with custom HTML and CSS to support it, it’s better and easier than ever to use.

New Bootstrap accordion

The new accordion includes Bootstrap Icons as chevron icons indicating state and click-ability. We’ve included support for a flush accordion (add .accordion-flush) to remove the outer borders, allowing for easier placement inside parent elements.

See the PR for extra details on what’s new, or visit the new docs page.

New block buttons

New block buttons

Block buttons are no more in v5—we’ve dropped the .btn-block class for .d-grid and .gap-* utilities. This allows for the same behavior and style, but with much greater control over spacing, alignment, and even responsive layout options.

See the buttons docs page for details.

Docs improvements

We’re always looking for new ways to improve our documentation, and this release is no different. We have a ton of changes big and small.

Docs search

We’ve added a keyboard shortcut to focus you on the search field. Hit Ctrl + / to trigger it.

We’ve also rewritten the docs sidebar to use actual <button> elements instead of anchors, and improved the focus styling.

Content-wise, we’ve renamed the “Navs” page to “Navs & Tabs” to help folks find our tab JavaScript features better. We’ve also made some style changes, improving the focus styles of heading anchor links and removing text wrapping from code snippets for shorter and easier to read code.

Sass

Three important and helpful changes to our Sass source code:

  • We’ve switched to Dart Sass with LibSass being deprecated. We’ve been testing our builds with Dart Sass for a while and decided to make the switch with LibSass being deprecated just a couple of weeks ago. We’re holding on the Sass modules for now.

  • The color system which worked with color-level() and $theme-color-interval was removed in favor of a new color system. All lighten() and darken() functions in our codebase are replaced by tint-color() and shade-color(). These functions will mix the color with either white or black instead of changing its lightness by a fixed amount. The scale-color() will either tint or shade a color depending on whether its weight parameter is positive or negative. See #30622 for more details.

  • We’ve added a Sass variable for CSS custom property prefixes.

JS

Ahead of some larger and necessary JavaScript changes in Beta 1, we’ve shipped a few updates to our plugins.

  • Simplified dropdown’s placement
  • Removed redundant polyfills since we dropped IE and Legacy Edge
  • Fixed the carousel data-interval bug by checking for data-interval on the first slide
  • Removed Manipulator.toggleClass to simplify some code since we only used it one place

Utilities

Utility classes are incredibly powerful in Bootstrap, especially with our new utilities API.

New utilities API docs

With our first beta, we’ve overhauled our API docs to provide clearer examples and information on adding, modifying, removing, and extending our default utilities.

In addition, we’ve added some new default utilities to make life a little easier:

  • Added .d-grid for display: grid
  • Added .fs utilities for font-size
  • Renamed font-weight utilities to .fw
  • Added .rounded-1, .rounded-2, and .rounded-3 for new small, medium, and large border-radius utilities
  • Added .overflow-visible and .overflow-scroll utilities

Our next release will also add another powerful feature to our utilities, pseudo-class support!

Forms

Forms have some exciting changes thanks to the addition of floating labels as a fully-fledged form layout option and a new file input.

Floating labels

New floating labels

Floating labels include support for textual inputs, selects, and textareas. We have one limitation with textareas where multiple lines of text can be obscured by the floating label. We’re working on fixes for this, so if you have ideas, please let us know!

New file input

New file input

We’ve dropped our custom .form-file class for additional styles on the .form-control class. This means we no longer require additional JavaScript to make our file input styles functional—the new form file is all CSS!

Input group rounded corners

Beyond that, we’ve finally resolved ourselves to adding a new class to fix the rounded corners on input groups when using validation. Add the .has-feedback class to the .input-group to enable validation messages inside input groups without any visual regressions. The good news is this is also being backported to v4 in our next release.

And more

In addition, we’ve made a few other form related improvements:

  • Removed explicit height from most of our form controls.
  • Fixed the disabled checkbox toggle buttons
  • Added docs examples for disabled .form-control, .form-select, and .form-range elements

Have some form feature requests or improvements we should consider? Please open an issue!

Quality of life

Lastly, across the board we’ve made some minor updates to browser support, Reboot styling, components, and more

  • Moved our preferred CDN from BootstrapCDN to jsDelivr
  • Dropped support for Legacy Edge (woohoo!)
  • Updated to Node.js 14 and PostCSS 8.x
  • Removed obsolete prefixes in our CSS
  • Added cursor: pointer and heights to color inputs
  • Removed background-clip on .btn-close so the background-image is no longer clipped
  • Improved sans-serif font selection in Ubuntu
  • Spinners now slow down when reduced motion is enabled rather than stopping outright
  • Fix inconsistent whitespace in breadcrumbs

See all the changes in the v5 Alpha 3 project board and v5 alpha 3 release changelog. Be sure to read the Migration guide for details on what’s changed since Alpha 2.

Coming in Beta 1

Beta 1 will be a more narrowly focused release and we’re hoping to ship these final breaking changes as part of it.

  • RTL!RTL is still coming! The PR is being reviewed by our team would like it to land in Beta 1 to ensure we can get some testing from the community.

  • Updating to Popper.js v2. Still on our radar, but moving slower than we anticipated due to some of the differences in the major release. See the PR for details.

  • Namespaced data attributes to help keep our functionality clearly separated from your own. See the PR.

  • Updated utilities API with pseudo-classes support via a state option. Add any space-separated list of states to get additional utilities for that pseudo-class. See the work-in-progress PR for details.

For a more up to date list of changes, be sure to follow along with the v5 Beta project board.

Get started

Head to https://v5.getbootstrap.com to explore the new release. We’ve also published this updated as a pre-release to npm, so if you’re feeling bold or are curious about what’s new, you can pull the latest in that way.

npm i bootstrap@next

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

<3,

@mdo& team

Bootstrap 5 Beta 1

$
0
0

With our first beta release of Bootstrap 5, we’re calling it on new features and breaking changes. From here on out, we’re only fine-tuning features, bugs, and documentation on our way to a stable v5 release. Woohoo!

Just like with the v4 development process, our docs for v5 have been temporarily hosted on a subdomain for the next major release. Starting today, those docs are being moved to the main domain and our old v5.getbootstrap.com domain will redirect.

There are some really awesome new features—RTL!—that have been added in this release, and they’ve come with some important changes. Keep reading for the lowdown and let us know what you think!

RTL

Bootstrap RTL docs

Our biggest addition to the project in years, we’ve finally added RTL support to Bootstrap! Please join me in giving @ffoodd—one of our newest contributors and author of the RTL pull request—a massive thank you. The pull request includes nearly 50 references to existing issues and PRs that have tried to implement the feature into our core.

At a high level, our RTL approach includes a handful of changes:

Our approach is built on RTLCSS, an awesome project that helps reprocess an existing LTR stylesheet for RTL. We’ve classified it as an experimental feature for now, anticipating that we’ll get some of this wrong. We’re looking to the community to help us round out the feature as we wrap up some remaining todos.

This issue has some outstanding todos already planned for our team to address. See something else we can improve? Please consider opening an issue or pull request.

Read up on RTL in Bootstrap in our docs, including required HTML changes, a starter template, details on our approach, and more.

Renamed classes for logical properties

Part of our approach to adding RTL to Bootstrap was to add it in a way that felt future-friendly to ourselves and the web at large. As such, we’ve embraced the spirit of CSS logical properties and have renamed several classes and variables. It’s a risky change because of the size and impact of the change, but we hope you’ll appreciate it overall!

Most of you have already interacted with logical properties thanks to our flex utilities—they replace direction properties like left and right in favor start and end. Things like align-items-end have been welcomed additions. This makes horizontal directional class names appropriate for LTR and RTL without any additional overhead moving forward.

For example, in a LTR context, instead of .ml-3 for margin-left, use .ms-3. Be sure to read the RTL Migration guide for a full list of renamed classes and variables.

Popper.js v2

Popper.js

We’ve upgraded Popper.js from v1.x to v2.x, bringing with it some small breaking changes to our tooltips and popovers. These two changes are why we haven’t been able to update to v2.x sooner.

  • Removed offset option from our Tooltip/Popover and Dropdown plugins; this can still be achieved using the popperConfig parameter.
  • The fallbackPlacement option has become fallbackPlacements.

Popper.js v2 also comes with a smaller file size for our primary dependency, updated positioning calculations, and much more. Beyond that, our tooltips and popovers are unchanged and just as powerful.

Namespaced data attributes

We’ve renamed all our data attributes to include bs as an infix, thereby namespacing all the HTML attributes that enable JavaScript behaviors from our plugins. See #31827 for details. It helps keep Bootstrap-required JavaScript triggers clearly identified throughout your projects.

Making this change is a tad annoying, but easy enough to remedy with a find and replace. The new attributes work just like the old ones, just a little more specific. For example, here’s a dropdown button and menu with the newly renamed data-bs-toggle attribute.

<divclass="dropdown"><buttonclass="btn btn-secondary dropdown-toggle"type="button"id="dropdownMenuButton"data-bs-toggle="dropdown"aria-expanded="false">
    Dropdown button
  </button><ulclass="dropdown-menu"aria-labelledby="dropdownMenuButton"><li><aclass="dropdown-item"href="#">Action</a></li><li><aclass="dropdown-item"href="#">Another action</a></li><li><aclass="dropdown-item"href="#">Something else here</a></li></ul></div>

New toast positioning

Popper.js

After dabbling in some JavaScript solutions to positioning toasts, we’ve landed on a new CSS-only approach thanks to our new positioning utilities. This comes with some minor breaking changes—namely some changes to exact CSS properties and how we toggle visibility of the toasts—but largely keeps them intact.

Our docs have been updated to include a new position preview picker, too, so you can see them in action. See the pull request for more details.

JS enhancements

Beyond the namespacing, we’ve been chipping away at a few other JavaScript improvements and bug fixes. Here’s a rundown of what’s new:

  • Created a new base component to share logic across our components. See #29370.
  • Migrate to more modern APIs across our plugins. See #32095.
  • Tooltips and popovers can now have custom classes. See #32217.
  • Don’t hide modal when config.keyboard is false. See #32179.

More JavaScript updates are coming soon, from performance and file-size improvements to new features.

States in the utilities API

One of the biggest new features of Bootstrap 5 is our utilities API, an extensible way to customize, add, or remove Bootstrap utilities. We’ve been iterating along the way and our newest improvement is the ability to add pseudo-class variants with the state option.

Use the state option to generate pseudo-class variations. Example pseudo-classes are :hover and :focus. When a list of states are provided, classnames are created for that pseudo-class. For example, to change opacity on hover, add state: hover and you’ll get .opacity-hover:hover in your compiled CSS.

Need multiple pseudo-classes? Use a space-separated list: state: hover focus.

$utilities:("opacity":(property:opacity,class:opacity,state:hover,values:(0:0,25:.25,50:.5,75:.75,100:1,)));

Which outputs to:

.opacity-0-hover:hover{opacity:0;}.opacity-25-hover:hover{opacity:.25;}.opacity-50-hover:hover{opacity:.5;}.opacity-75-hover:hover{opacity:.75;}.opacity-100-hover:hover{opacity:1;}

See #31643 for more context on the change.

And more…

Elsewhere we’ve made a handful of other breaking changes and improvements. The most notable updates include:

  • Breaking: Renamed scale-color() function to shift-color() . See #32149.

  • Breaking: Simplified the make-container() mixin and $container-padding-x. See #31735.

  • Fixed: Corners remain rounded now in vertical button groups. See #31303.

  • Fixed: Removed default linear gradient on some table rows that caused undesirable performance. Still more work to do here FYI. See #32277.

  • Updated: Breadcrumbs now have a simplified appearance. Use utilities to restore the padding, background-color, and border-radius as desired. See #32249.

  • Updated: Finalized browserslist configuration to match our supported browsers. See #30986.

For a more complete list of of changes, checkout the v5 Beta project board or list of issues and PRs in this release.

Get started

Head to https://getbootstrap.com to explore the new release. We’ve also published this updated as a pre-release to npm, so if you’re feeling bold or are curious about what’s new, you can pull the latest in that way.

npm i bootstrap@next

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

<3,

@mdo& team


Bootstrap Icons v1.2.0

$
0
0

Our latest Bootstrap Icons release includes dozens of new icons, redesigned documentation, and the most highly requested new feature—icon fonts!

New social icons

We’re starting slow with social icons—just a handful of the biggest sites and networks folks are likely to need. We’ll keep this list purposefully small as the intent isn’t for full coverage. We’ll aim to add a few over time, but this should suffice for the time being!

Social icons

New media icons

The other main addition is our extended suite of media icons. We had folks ask for more options when it came to media controls, as well as different media types, so we’re getting the ball rolling with this update.

Media icons

Icon fonts!

Finally, they’re here! We’re now generating web fonts for our icons thanks to a wonderful project, Fantasticon. To start, we’re generating two web font formats—.woff and .woff2. We’re also including an HTML index of all icons in web font format, powered by a generated CSS file.

Web fonts index

This is our first foray into icon fonts, and we’re likely to make some tweaks along the way. Help us iron out any kinks by testing the fonts yourself and sharing any feedback in an issue.

Refreshed docs

New Icons homepage

The homepage for Bootstrap Icons has a new look thanks to an updated hero. The new hero features a new colorful icon image, clearer project description, and an upfront npm i snippet to help folks get started faster. A new notice at the top links to the blog post to tell folks what’s new, too.

New Icons permalink

Individual icon permalink pages have also been refreshed and greatly simplified. We’ve reduced the main example down to one instance of the icon, and expanded the examples below it to include the icon in more Bootstrap components.

The new permalink sidebar also features new and improved access to the icons. Need just an SVG or two? Use the new Download SVG button. Looking for the HTML for the new icon fonts? Just copy-paste. And as always, want the raw SVG HTML? That’s still there, too.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

<3,

@mdo& team

Bootstrap Icons v1.2.1

Bootstrap Icons v1.2.2

$
0
0

We’re ironing out the kinks in our new font files with Bootstrap Icons v1.2.2! We went back to the Figma file and ironed out all the fill-rule details to ensure our SVGs translated into font files properly.

We also snuck in a few bug fixes to existing icons, docs, and some slight visual improvements to some existing icons. Get the details below!

Font files

Our icons fonts are (fingers crossed!) free of visual glitches that made so many unusable across Windows devices. For some reason macOS and iOS had no problems, but Windows butchered the font files. Turns out this was a result of inconsistent fill-rule values in our icons, and some font formats and renderers only support a non-zero fill rule. We revisited nearly every icon and got it all sorted out.

Icon fonts

Massive shoutout to the Figma Fill Rule Editor plugin that made this relatively quick and painless to update. You can even see in the plugin’s image below how this rule affects rendering of SVGs.

Figma Fill Rule Editor plugin

Check out the PR for what’s changed under the hood.

Updated icons

Revised icons

A few icons got touched up with the work for our font files to clean up paths and make them more visually pleasing.

  • Locks are a little more legible—they’re taller and narrower.
  • Laptops now have a half pixel gap between their base and screen, making them look a little sleeker.
  • Shields are 1px taller now, with their inner icons now raised 1px as well. No reason to make them not take up the full viewBox.
  • Stopwatch icons look more like actual stopwatches with separate start/stop and lap buttons.
  • The bricks icon has its missing grout line restored.
  • Renamed patch fill icons to fix typos in their file names (fll to fill).

Have some other refinements we should consider? Open an issue to tell us about it.

Last but not least, we ironed out some docs issues. Our navbar is fully functional and inline with the v5 beta site. We also added new aliases for icon filtering on homepage.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

<3,

@mdo& team

Bootstrap Icons v1.3.0

$
0
0

Say hello to over 60 new icons with Bootstrap Icons v1.3.0! We focused our efforts on filling in some holes and expanding some coverage of a few categories. We’re super happy with how the new additions came out and hope y’all love them, too!

As usual, we also snuck in some bug fixes to existing icons and ours docs. After this release, we’re back to focusing on shipping updates to Bootstrap v5 and v4. More on that soon, and in the mean time, enjoy the new icons!

60+ new icons

New icons in v1.3.0

Here’s a look at the new icons in v1.3.0:

  • Added window-dock and window-sidebar
  • Added two symmetry icons
  • Added new stack icon
  • Added two speedometer icons
  • Added four save icons
  • Added rulers icon
  • Added filled variations for phone-vibrate, mouse, mouse2, mouse3, and four hand icons
  • Added several border icons
  • Added paint bucket
  • Added four new badges (3D, AR, VR, WC)
  • Added four lightbulb icons
  • Added eyedropper
  • Added mask icon
  • Added three color palette icons
  • Added layer-forward and layer-backward
  • Added two eraser icons
  • Added two megaphone icons
  • Added four push pin icons
  • Added Whatsapp and Telegram social icons
  • Added dotted circle dash, circle plus, square dash, and square plus

Have some ideas for new icons we should consider? Open an issue to tell us about it!

CDN quickstart with icon fonts

Since we added icon fonts in v1.2.0, it’s been possible to use a CDN to deliver and use Bootstrap Icons in seconds. Include the stylesheet, place short HTML snippets where you want icons, and you’re done! If you want to include it yourself, here’s how.

  1. Include the Bootstrap Icons font stylesheet in the <head> of your website. Or, use @import to include the stylesheet that way.

    <!-- Option 1: Include in HTML --><linkrel="stylesheet"href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
    /* Option 2: Import via CSS */@importurl("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css");
  2. Add HTML snippets to include Bootstrap Icons where desired.

    <iclass="bi-alarm"></i>

Want to see it in action? We’ve put together a helpful CodePen demo for using Bootstrap Icons fonts via CDN.

ProTip: Most browsers do not allow SVG sprites to be used across domains, which is why having icon fonts (when SVGs are the preferrable and more accessible method of delivering icons) are so useful. Whenever possible, please use SVGs over icon fonts.

Install

To get started, install via npm:

npm i bootstrap-icons

You can also download the release from GitHub, or download just the SVGs and fonts (without the rest of the repository files).

Figma

For the Figma users out there, you can also snag the icons from Figma.

<3,

@mdo& team

Bootstrap v4.6.0

$
0
0

Bootstrap v4.6.0 is here with a couple new features, several bugfixes, and some awesome documentation updates to make v4 more maintainable alongside our development of v5.

Read on for the highlighted changes or head to the v4.6 docs to see the latest in action.

Hugo!

The biggest change in v4.6.0 is under the hood—we’ve overhauled our development environment to match that of v5. Our v4.x docs are now powered by Hugo. That means no more Ruby dependency for v4.x, improved maintainability between major versions, faster development, and incredibly fast build times compared to Jekyll.

Changes

Also available in the v4.6.0 release on GitHub.

Highlights

  • Tooltips and popovers can have custom clases via customClass option.
  • Added new .navbar-nav-scroll class for scrolling expanded navbar contents on mobile devices.
  • For improved accessibiliy, spinners now slow down when prefers-reduced-motion is enabled.
  • v4.x docs are now built on Hugo for easier maintenance and backports from v5.x.
  • Darkened background-color of .dropdown-item for improved hover state contrast, and ligthened the disabled .dropdown-itemcolor.
  • Improved alignment of form validation tooltips.
  • File inputs no longer extend beyond their containers.

CSS

  • #31557: Fix form validation tooltip alignment
  • #31657: Handle the Ubuntu sans-serif case
  • #31700: Suppress flexbox side effects in breadcrumb
  • #31882: Slow down spinners when prefers-reduced-motion
  • #31886: Fixed: Undefined mixin “deprecate” when importing “bootstrap-grid-scss”
  • #32141: Use correct value order
  • #32145: Avoid invisible real file input “spilling” out of container
  • #32160: Add overflow suppression to custom file label
  • #32211: Move negative margin-bottom from .nav-item to .nav-link
  • #32212: Remove needless Stylelint disables
  • #32833: Add .navbar-nav-scroll for vertical scrolling of navbar content
  • Add two new variables for pagination border-radius values; backport of #32423
  • Remove old/unnecessary reboot bug fix; backport of #32631
  • Suppress focus outline for buttons when it shouldn’t be visible in Chromium; backport of #32689
  • Consistently use outline:0 rather than outline:none; backport of #32751
  • Darken dropdown item hover style; backport of #32754
  • Lighten disabled dropdown text to $gray-500

JS

  • #31820: Check for data-interval on the first slide of carousel
  • #31834/#32225: tooltip/popover: add a customClass option
  • #32001: Move js/src/index.js one folder up
  • #32045: tests: fix sanitizer test
  • #32220: Don’t hide modal when config.keyboard is false
  • #32312: build-plugins: switch to “bundled” for babel helpers

Docs

  • #31861: Split up dropdown sizing docs to improve rendering
  • #31892: Remove redundant visually hidden “(current)” from pagination controls
  • #31893: manifest.json: Switch to relative URLs so that we don’t need to change the path with every major/minor release
  • #31898: switch to suggesting jsDelivr as a CDN
  • #31904:
    • docs(forms): use a legend for fieldset instead of aria-label
    • docs(forms): fix incorrect legend nesting in fieldset
  • #31936: forms: change inline custom radio name
  • #31951: Update anchor-js to v4.3.0
  • #31960: Explicitly mention emoji fonts, tweak sentence in typography
  • #31981: list-group.md: fix snippet
  • #32005: Remove bugreport.apple.com since it doesn’t work
  • #32015: Fix redirects
  • #32050: Make docs anchorjs links darker on keyboard focus
  • #32054: Add callouts about using light colors ideally on a dark background
  • #32077: Switch to Hugo
  • #32083: mention “Liberation Sans”
  • #32087: download.md: link to JS files comparison too
  • #32094: Changes to navbar documentation/explanation
  • #32106: Clarify JS bundle docs once more for v4
  • #32137: input-group.md: fix wrong class .visually-hidden
  • #32138: navbar.md: remove loading=lazy from snippets
  • #32147: Fix caniuse.com redirects
  • #32151: Mention user-select-all support in docs
  • #32196: homepage: split snippets and show copy buttons
  • #32203: Switch to jsDelivr for the remaining docs assets
  • #32223: introduction: split comments
  • #32247: Fix typos in tooltip/popover docs
  • #32253: Add Russian translation
  • #32363: Remove useless .text-left in Layout / Overview
  • #32399: Remove duplicated “follow Bootstrap on Twitter” link in Community section
  • #32457: Add mention of the bs-custom-file-input plugin needed for the custom file input
  • #32461: style clipboard button on :focus, not just :hover
  • #32462: Replace Lorem Ipsum placeholder text with more representative (or at least english language) text
  • #32634: Remove incorrect mention of dropdowns for dynamic tab behavior
  • #32639: v4: Add an actual data-touch="false" example in the carousel docs
  • #32728: add v5.0 in versions
  • #32761: Mention stretched-link constraints with table elements
  • #32789: Remove role="button" from CTA links in carousel example
  • #32791: Docs v4: Sass implementation and rounding precision
  • #32809:
    • Clarify Sass import and customize docs for how to modify variable defaults
    • Add an npm starter project callout to a few pages
  • #32827: Add a live toast example to the docs
  • #32759: Mention CSP and embedded SVGs in v4 docs
  • docs(dropdowns): clarify where is .show applied
  • Require .has-validation for input groups with validation
  • Fix mobile menu jump & double border
  • Remove double spaces from homepage SVGs
  • browserconfig.xml: switch to relative image path
  • Tweak the wording for collapse to indicate button is preferred/more semantic; backport of #32632
  • Clarify the $enable-shadows option in our docs; backport of #32685

Examples

  • #31979: v4 Examples/Floating-labels: fix bad behavior with autofill
  • #32198: examples: add the version number in title

Misc

  • #29753: Improve build/generate-sri.js regex
  • #32003: CI: switch to Node.js 14
  • #32008: Update Edge’s Rendering Engine on CONTRIBUTING.md
  • #32486: BrowserStack: test on macOS Catalina instead of High Sierra
  • #32756: Stylelint: disallow some property values
  • Fix for npm 7.x package.json: move version_short variable under the config object; backport of #32737
  • Update build-examples script so that the resulting examples zip file includes only the needed files
  • Various CI tweaks
  • Updated devDependencies

Next up

Our second beta of v5 is coming. We’re working on ironing on some kinks from the update to Popover 2, which has taken longer than expected. This affects our dropdowns, popovers, and tooltips. Once some of the major issues are resolved, we’ll ship our next beta.

Please keep the feedback coming on what we can improve, how our releases are performing, and any other suggestions.

Support the team

Visit our Open Collective page or our team members’ GitHub profiles to help support the maintainers contributing to Bootstrap.

Viewing all 134 articles
Browse latest View live