more margin option, with name
This commit is contained in:
parent
c90db49be3
commit
3a15e58ee3
@ -3101,6 +3101,14 @@ select {
|
|||||||
margin: 5rem;
|
margin: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.xl\:m-8 {
|
||||||
|
margin: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xl\:m-14 {
|
||||||
|
margin: 3.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.xl\:mx-auto {
|
.xl\:mx-auto {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
@ -75,10 +75,13 @@ module Merged
|
|||||||
end
|
end
|
||||||
|
|
||||||
def margin_option(section , clazz = "")
|
def margin_option(section , clazz = "")
|
||||||
if section.has_option?("margin")
|
return {class: clazz} unless section.has_option?("margin")
|
||||||
clazz += margin_for(section)
|
margin = { "none" => " m-0" ,
|
||||||
end
|
"small" => " 2 md:4 lg:6 xl:m-8" ,
|
||||||
{class: clazz}
|
"medium" => " 5 md:8 lg:10 xl:m-14" ,
|
||||||
|
"large" => " 8 md:12 lg:16 xl:m-20" ,
|
||||||
|
}[section.option("margin")] || ""
|
||||||
|
{class: clazz + margin}
|
||||||
end
|
end
|
||||||
|
|
||||||
def text_color_option(section , clazz = "")
|
def text_color_option(section , clazz = "")
|
||||||
@ -145,13 +148,7 @@ module Merged
|
|||||||
"solid_black" => " bg-slate-900" ,
|
"solid_black" => " bg-slate-900" ,
|
||||||
}[section.option('background')] || ""
|
}[section.option('background')] || ""
|
||||||
end
|
end
|
||||||
# need full margin names for tailwind to pick it up
|
|
||||||
def margin_for( section )
|
|
||||||
{ "0" => " m-0" ,
|
|
||||||
"none" => "" ,
|
|
||||||
"20" => " 8 md:12 lg:16 xl:m-20" ,
|
|
||||||
}[section.option("margin")] || ""
|
|
||||||
end
|
|
||||||
# need full color names for tailwind to pick it up
|
# need full color names for tailwind to pick it up
|
||||||
def color_for( section )
|
def color_for( section )
|
||||||
{ "white" => " text-white",
|
{ "white" => " text-white",
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
- :name: margin
|
- :name: margin
|
||||||
:description: Most sections have standard margin of 20. This option makes it possible
|
:description: Most sections have standard margin of 20. This option makes it possible
|
||||||
to remove that
|
to remove that
|
||||||
:values: 0 20
|
:values: none small medium large
|
||||||
:default: 20
|
:default: large
|
||||||
:id: 8
|
:id: 8
|
||||||
- :name: button_text
|
- :name: button_text
|
||||||
:description: Text for an optional button. Must also set button_link
|
:description: Text for an optional button. Must also set button_link
|
||||||
|
Loading…
Reference in New Issue
Block a user