...that parse data correctly, like the parser gem for Ruby code or Nokogiri for HTML. Regular expressions are a blunt tool that happens to be good enough much of the...

...time. Read Parsing Html The Cthulhu Way for more...

...implement basic e-mail styling (not required for the exercises below) Watch the talk "HTML E-Mails mit MJML đź”’" (slides) Visit Can I Email. Can you use flex styles in...

...this array in your tests. Discuss With your mentor, discuss the challenges of implementing HTML mails well...

A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...

...sites with their documentation, e.g.: http://unpoly.com https://lodash.com/ https://fontawesome.com/icons Web Platform (HTML, JavaScript, CSS) The best reference to look up information on HTML tags, JavaScript features or...

...it inline within the browser window. You can do so with either the [download] HTML attribute, or by sending a Content-Disposition header when delivering the image. When editing a...

...sees an image review, downloads image. Capybara needs the browser to show an interactive HTML page to be happy. Capybara methods will fail when the browser shows a "Save as...

...t need a Rails project for this. Just make a new folder with static HTML and CSS files. You can push it into a new repository in GitLab.

...peak too much into the actual HTML and CSS of makandracards.com. You are likely to have trouble deciding where to draw the line between the blocks. E.g. a structure could...

Our applications not only need to be functional, they need to be fast. But, to quote Donald Knuth, premature optimization...

...styles incorrectly. As a reminder, this will disallow inline styles you set in your html inline styles set by JS libraries using element.style = 'display: none;' What will keep working is...

...the multipart option like this in very old versions of Rails: form_for @invoice, :html => { :multipart => true } do If you do not, Rails will only receive the file name...

You have uncommited changes (you can always check by using git status), which you want to discard.

...Rack::MiniProfiler.config.skip_paths = [ # ignore most asset requests %r(/system.*), %r(/assets.*), ] Rack::MiniProfiler.config.html_container = 'html' # avoid unpoly replacements end end SQL Rack-Mini-Profiler will give you a lot of...

...will have a hard time using your page. ✔️ Better solution: Use a fitting native HTML element Do not use the hacks above. Instead, use the HTML element which was meant...

...like you know it from Rails. Reminder: Middleman brings the handy helper methods capture_html, content_tag and tag. Environments Middleman 4+ supports different environments. Think of them as config.rbs...

Configure Capybara-Screenshot with this file: # features/support/capybara_screenshot.rb require 'capybara-screenshot/cucumber' # Have HTML screenshot render with assets (while `middleman` is running) Capybara.asset_host = 'http://localhost:4567' module Capybara...

...ellipsis (...) after a specific amount of lines for a multi-line text in your HTML. Earlier, it was necessary to implement JavaScript solutions like Superclamp.js to enable this because the...

...a surrounding container and only focus on the text. This will, however, add more HTML to your DOM structure which may be annoying. Still, we recommend to use the CSS...

...path or asset_path if you need the raw asset hashed paths without an HTML tag. Whenever you don't pipe an asset path through a Rails helper, you don...

developer.mozilla.org

Let's take a look at a common example: Clear Search The HTML above is being activated with an Unpoly compiler like this: up.compiler('[filter]', function(filterForm) {

...StreetMap class: // street_map.js class StreetMap { function getLatitude() { // ... } function renderOn(mapElement) { // ... } } export default StreetMap Your HTML structure may look like this: The target attribute may be fetched from the database/your record...

...which means that units are never based on results of declarations. For example, in HTML, the em unit is relative to the initial value of font-size, defined by the...

...you set a root font size, do not express @media queries in rem. Example html { font-size: 20px; } @media (min-width: 100rem) { // Styles for large screens } You would expect the...

github.com

...that supports it (e.g. Selenium, not the default Rack::Test driver). Consider the following HTML: One Two With some CSS: .test1 { display: block } .test2 { display: none } We will be using...

makandra dev

...focus-visible). Interactive elements without a text label have an aria-label. uses Semantic HTML is well usable. Interacting with the component: feels natural does not require unnecessary steps (e.g...

haml.info

Haml renders HTML with indentation reflecting the nesting level of elements. When it comes to white-space preserving content, this may become a problem: the content will be rendered including...

...the HTML indentation. Problematic: Preserved Indentation .nest %span Reference %pre = content Reference Hello World Better: Without Extra Indentation Render with tilde ~ instead of equals = to keep Haml from indenting content...

...routes to use the same constraint you can use the block syntax: constraints(format: 'html') do resources :pages resources :images end If you want constraints only on certain routes, you...

get '/users/account' => 'users#account', constraints: { format: 'html' } Tip You can also avoid this error type through format constraints in your controllers and use correct file names...

...forever, even if the $element variables go out of scope. Note that jQuery's html() method explicitely traverses through all removed elements in order to clean up the jQuery Cache...

...body').html(''); Detached elements cannot be collected if they have data or event handlers Let's say that you create a DOM element through jQuery, set a data attribute on...

Partials always define a local variable with the same name as themselves. E.g. when you are in _recent_users.html.erb, a local...