Organize existing popup styles
This commit is contained in:
@@ -41,17 +41,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
.popup__footer {
|
||||
background-color: var(--color-canvas);
|
||||
border-block-start: 1px solid var(--color-ink-lighter);
|
||||
font-size: var(--text-small);
|
||||
inset: auto 0 0;
|
||||
line-height: 1.6;
|
||||
margin-block-start: var(--block-space-half);
|
||||
padding: 1.5ch;
|
||||
position: sticky;
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
.popup__title {
|
||||
font-weight: 800;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.popup__group {
|
||||
@@ -87,6 +79,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
.popup__group-title {
|
||||
background: var(--color-canvas);
|
||||
font-size: var(--text-small);
|
||||
font-weight: bold;
|
||||
list-style: none;
|
||||
padding: var(--block-space-half) var(--inline-space-half);
|
||||
position: sticky;
|
||||
text-transform: uppercase;
|
||||
top: calc(-1 * var(--block-space));
|
||||
z-index: 1;
|
||||
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.popup__list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -125,8 +133,7 @@
|
||||
}
|
||||
|
||||
.icon {
|
||||
block-size: 1em;
|
||||
inline-size: 1em;
|
||||
--icon-size: 1em;
|
||||
}
|
||||
|
||||
&:has(input:checked) {
|
||||
@@ -155,21 +162,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
.popup__title {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.popup__group-title {
|
||||
background: var(--color-canvas);
|
||||
.popup__footer {
|
||||
background-color: var(--color-canvas);
|
||||
border-block-start: 1px solid var(--color-ink-lighter);
|
||||
font-size: var(--text-small);
|
||||
font-weight: bold;
|
||||
padding: var(--block-space-half) var(--inline-space-half);
|
||||
inset: auto 0 0;
|
||||
line-height: 1.6;
|
||||
margin-block-start: var(--block-space-half);
|
||||
padding: 1.5ch;
|
||||
position: sticky;
|
||||
text-transform: uppercase;
|
||||
top: calc(-1 * var(--block-space));
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* Variants
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
.popup--animated {
|
||||
opacity: 0;
|
||||
transform: scale(0.2) translateX(-50%);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
dialog_target: "dialog",
|
||||
navigable_list_focus_on_selection_value: false,
|
||||
navigable_list_actionable_items_value: true } do %>
|
||||
<strong class="popup__title txt-nowrap">Assign this to…</strong>
|
||||
<strong class="popup__title">Assign this to…</strong>
|
||||
|
||||
<% if @collection.users.active.count > 1 %>
|
||||
<%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small margin-block-half", autofocus: true,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
dialog_target: "dialog",
|
||||
navigable_list_focus_on_selection_value: false,
|
||||
navigable_list_actionable_items_value: true } do %>
|
||||
<strong class="popup__title pad-inline-half txt-nowrap">Move this card to…</strong>
|
||||
<strong class="popup__title pad-inline-half">Move this card to…</strong>
|
||||
|
||||
<% if Current.user.collections.count > 1 %>
|
||||
<%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small margin-block-half font-weight-normal", autofocus: true,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
data-navigable-list-actionable-items-value="true"
|
||||
data-action="keydown->navigable-list#navigate filter:changed->navigable-list#reset dialog:show@document->navigable-list#reset"
|
||||
>
|
||||
<strong class="popup__title txt-nowrap">Tag this…</strong>
|
||||
<strong class="popup__title">Tag this…</strong>
|
||||
|
||||
<%= form_with url: card_taggings_path(@card), class: "flex flex-column gap-half full-width margin-block-half" do |form| %>
|
||||
<%= form.text_field :tag_title, placeholder: @tags.any? ? "Add a new tag or filter…" : "Name this tag…", class: "input txt-small full-width",
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<%= form_with url: user_filtering.self_filter_path, method: :get, class: "display-contents",
|
||||
data: { controller: "form" } do |form| %>
|
||||
<% if user_filtering.collections.any? %>
|
||||
<% if user_filtering.collections.any? %>
|
||||
<details open>
|
||||
<summary class="popup__group-title">Collections</summary>
|
||||
|
||||
<ul class="popup__list">
|
||||
<li class="popup__group-title">Collections</li>
|
||||
<%= render "filters/menu/collections/all_option", form: form, user_filtering: user_filtering %>
|
||||
<%= render partial: "filters/menu/collections/collection", collection: user_filtering.collections, as: :collection, locals: { form: form, user_filtering: user_filtering } %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%= form_with url: user_filtering.self_filter_path, method: :get, class: "display-contents", data: { controller: "form" } do |form| %>
|
||||
<ul class="popup__list">
|
||||
<%= render "filters/menu/collections/all_option", form: form, user_filtering: user_filtering %>
|
||||
<%= render partial: "filters/menu/collections/collection", collection: user_filtering.collections, as: :collection, locals: { form: form, user_filtering: user_filtering } %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</details>
|
||||
<% end %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</button>
|
||||
|
||||
<%= filter_dialog "Assigned to…" do %>
|
||||
<strong class="popup__title txt-nowrap">Assigned to…</strong>
|
||||
<strong class="popup__title">Assigned to…</strong>
|
||||
|
||||
<% if User.active.many? %>
|
||||
<%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</button>
|
||||
|
||||
<%= filter_dialog "Closed by…" do %>
|
||||
<strong class="popup__title txt-nowrap">Closed by…</strong>
|
||||
<strong class="popup__title">Closed by…</strong>
|
||||
|
||||
<% if user_filtering.users.many? %>
|
||||
<%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</button>
|
||||
|
||||
<%= filter_dialog "Added by…" do %>
|
||||
<strong class="popup__title txt-nowrap">Added by…</strong>
|
||||
<strong class="popup__title">Added by…</strong>
|
||||
|
||||
<% if user_filtering.users.many? %>
|
||||
<%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</button>
|
||||
|
||||
<%= filter_dialog "Filter by…" do %>
|
||||
<strong class="popup__title txt-nowrap">Filter by…</strong>
|
||||
<strong class="popup__title">Filter by…</strong>
|
||||
|
||||
<ul class="popup__list" data-filter-target="list">
|
||||
<% Filter::INDEXES.each do |index| %>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</button>
|
||||
|
||||
<%= filter_dialog "Sort by…" do %>
|
||||
<strong class="popup__title txt-nowrap">Sort by…</strong>
|
||||
<strong class="popup__title">Sort by…</strong>
|
||||
|
||||
<ul class="popup__list" data-filter-target="list">
|
||||
<% Filter::SORTED_BY.each do |sort| %>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</button>
|
||||
|
||||
<%= filter_dialog "Tagged…" do %>
|
||||
<strong class="popup__title txt-nowrap">Tagged…</strong>
|
||||
<strong class="popup__title">Tagged…</strong>
|
||||
|
||||
<% if user_filtering.tags.many? %>
|
||||
<%= text_field_tag :search, nil, placeholder: "Filter…", class: "input input--transparent txt-small", autofocus: true,
|
||||
|
||||
Reference in New Issue
Block a user