Skip to content

Instantly share code, notes, and snippets.

View germsvel's full-sized avatar

German Velasco germsvel

View GitHub Profile
@germsvel
germsvel / .projections.json
Last active April 24, 2023 14:20
Elixir/Phoenix basic projections
{
"lib/**/views/*_view.ex": {
"type": "view",
"alternate": "test/{dirname}/views/{basename}_view_test.exs",
"template": [
"defmodule {dirname|camelcase|capitalize}.{basename|camelcase|capitalize}View do",
" use {dirname|camelcase|capitalize}, :view",
"end"
]
},
class ProgressBar
# Prints progress like this:
# Progress: (15%) [==== ]
def initialize(total)
@total = total
@counter = 0
@bar_width = 50
end

Styling a select tag can be difficult.

Here are some styles that make it okay looking without having to resort to turning it into a ul and using js to handle interaction.

<span class="custom-dropdown">
  <select class="custom-dropdown__select">
    <option value="option1">Option 1</value>
    <option value="option2">Option 2</value>