Skip to main content

Command Palette

Search for a command to run...

Fix missing icons in Active Admin’s Bootstrap skin

Updated
2 min read
Fix missing icons in Active Admin’s Bootstrap skin

If you’re experiencing missing icons in the Active Bootstrap skin for Active Admin in a Ruby on Rails application, then you’re not alone.

Active Bootstrap skin with missed icons

This article applies to the version [0.1.5](https://rubygems.org/gems/active_bootstrap_skin/versions/0.1.5) of the Active Bootstrap skin gem.

To fix this issue, open the file app/assets/stylesheets/active_admin.scss and modify:

// @import "active_bootstrap_skin"; <- remove or comment this line previously in your code
@import "active_bootstrap_skin_modified";

Then, create a new file app/assets/stylesheets/active_bootstrap_skin_modified.scss. Paste the content of the file active_bootstrap_skin from the original gem. Here is the link to this file on the gem’s repository: https://github.com/vinhnglx/active_bootstrap_skin/blob/master/app/assets/stylesheets/active_bootstrap_skin.scss

In this file, delete or comment following lines (note: the completed code is presented here):

// #main_content_wrapper .table_actions {
// @extend .btn-toolbar;
// min-width: 117px;

// > .member_link {
// margin: (-3px) 10px 0 0;

// &:last-child {
// margin-right: 0;
// }
// }
// }

// @extend .glyphicon;
// font-size: 0;
// text-align: center;
// padding: 3px 0;
// width: 28px;

// &:before {
// font-size: 14px;
// }

// .ui-sortable-handle {
// @extend .glyphicon-sort;
// cursor: all-scroll;
// }

// .view_link {
// @extend .glyphicon-search;
// }

// .edit_link {
// @extend .glyphicon-pencil;
// }

// .delete_link {
// @extend .glyphicon-trash;
// }

Update the browser tab and you will see that buttons are now too big:

Buttons are too big

To fix this, add the following lines to the end of the file:

.member_link, .ui-sortable-handle {
padding: 0px 10px;
}

The result:

Buttons with the proper size and without icons

You can see the completed file here.

More from this blog

Невидимий дизайн: Чому «хмара часток» в Apple Watch — це геніальний інженерний хід

Кожен розробник, який хоч раз налаштовував Apple Watch, відчував цей «wow-ефект». Замість стандартного QR-коду — таємнича анімація, яку iPhone зчитує за частку секунди. Як інженер, я не міг пройти повз і не розібратися: як це працює насправді? Довгий...

Jan 27, 20262 min read
Невидимий дизайн: Чому «хмара часток» в Apple Watch — це геніальний інженерний хід

Як додати графік відключення світла у Календар?

Оновлення Ця стаття втратила актуальність після закінчення відключення світла. Останнє відключення світла у Львові було 30 грудня 2024 р. Ви можете легко додати графіки погодинних відключень світла у місті Львові в Google Календар на Android чи Apple...

Jun 22, 20241 min read
Як додати графік відключення світла у Календар?
V

Viacheslav Kharchenko

20 posts

Ukrainian Tech Lead & Rails dev.

Solving software engineering bottlenecks and daily routine friction — from smart homes to life-ops. Streamlining code and life, one fix at a time.