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

Cannot use other units than 'px' for $alert-padding variable #20485

Closed
webmasterlv opened this issue Aug 8, 2016 · 3 comments
Closed

Cannot use other units than 'px' for $alert-padding variable #20485

webmasterlv opened this issue Aug 8, 2016 · 3 comments

Comments

@webmasterlv
Copy link

webmasterlv commented Aug 8, 2016

In v4 alpha3:

If trying to override $alert-padding with something like
$alert-padding: 1rem
The Sass compilation fails with
Error: Incompatible units: 'px' and 'rem'.

Because in _alert.scss there's this
padding-right: ($alert-padding + 20px);

@tschallacka
Copy link

$alert-padding: 2em;
.foo {
   padding-right: calc( #{$alert-padding} + 20px  );
 } 

might be a nice solution.

@mdo mdo added this to the v4.0.0-alpha.4 milestone Aug 22, 2016
@lucasgladding
Copy link

lucasgladding commented Aug 22, 2016

Is there a reason this can't be done the same as the close button on modals? Removing the styling for .alert-dismissible and offsetting the top margin gives the same appearance for single lines.

.alert .close {
    margin-top: -2px;
}

For multiple lines, text could appear below the button, which is the only reason I can think of for the alternative approach.

@mdo
Copy link
Member

mdo commented Sep 5, 2016

Addressed with #20625.

@mdo mdo closed this as completed Sep 5, 2016
krissihall pushed a commit to krissihall/bootstrap that referenced this issue Sep 7, 2016
…0_aeo-bootstrap

* 'v4-dev' of https://github.com/twbs/bootstrap: (860 commits)
  Update Bower url (HTTP to HTTPS) (twbs#20658)
  Add Edge entry for twbs#20507 to Wall of Browser Bugs
  Move Sauce credentials out of .travis.yml
  new hashes
  grunt
  versions
  grunt
  Fixes twbs#20608 and twbs#20578: Consistent checkbox and radio markup (twbs#20629)
  Disable important flag on Sass linter (twbs#20627)
  Fixes twbs#20619: Add important to the hover/focus as well (twbs#20626)
  grunt
  Fix segmented buttons in input group docs (twbs#20489)
  Renamed contextual classes for tables (twbs#20505)
  Make .card class inside .card-columns display: block too (twbs#20447)
  grunt
  Remove unused $variables in grid mixins (twbs#20597)
  fixes twbs#20485: use rem units in alert dismiss (twbs#20625)
  Fix README badge alignment.
  Update ads code and styles (also fixes twbs#20477 in different way)
  Fixes twbs#20504: Mention .divider to .dropdown-divider name change
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants