Skip to content

Instantly share code, notes, and snippets.

View czajkovsky's full-sized avatar

Mateusz Czajka czajkovsky

  • Netguru
  • Poznań
View GitHub Profile
.post {
background: blue;
&__title {
background: red;
}
}
.post {
background: blue;
}
.post__title {
background: red;
}
$alerts: (error, red, 1px),
(success, green, 2px),
(info, blue, 2px);
@each $type, $color, $border-width in $alerts {
.alert--#{$type} {
border: $border-width solid $color;
}
}
$alerts: (
error: red,
success: green,
info: blue
);
.alert-error {
background: map-get($alerts, error);
}
@czajkovsky
czajkovsky / SassMeister-input-HTML.haml
Last active August 29, 2015 14:01
Generated by SassMeister.com.
#nav
%h1 Netguru front-end rekru
#users{ style: "background: #f00" }
%a{ href: 'http://sample.com/czajkovsky' }
#user.id_13
.user__id 13
.user__name Mateusz Czajka
%a{ href: 'http://sample.com/olabee' }
#user.id_14
@czajkovsky
czajkovsky / SassMeister-input-HTML.haml
Created June 3, 2014 12:44
Generated by SassMeister.com.
%ol
%li
%li
%li
%li
%li
%li
%li
%li
%li
@czajkovsky
czajkovsky / SassMeister-input-HTML.haml
Created June 8, 2014 20:54
Generated by SassMeister.com.
.foo
.square
.foo
.circle
.foo
.rectangle
.circle-2
# lib/my_gem/railtie.rb
module CreatingAGem
class Railtie < Rails::Railtie
# for example, if you want to extend ViewHelpers
initializer 'creating_a_gem.view_helpers' do
ActionView::Base.send :include, ViewHelpers
end
end
end
├── app [+]
├── apps
│ └── internal_api
│ └── lib
#config/routes.rb
Aaewebinar::Application.routes.draw do
root to: 'application#index'
mount InternalApi::Engine, at: :internal_api #<- this line right here!
end