...with the width and the div should only have the height of the picture. html: css: .outer { width: 100%; background-image: image-url('background.png'); background-size: cover; } .inner {
...you only depend on the width of the viewport, you can also use vw: html: css: .background-sizer { width: 100%; height: 60vw; background-image: image-url('background.png'); background-size: cover...
...with isolate scopes have three different variable binding strategies, of which one is =. Example: # HTML # Coffeescript @app.directive 'panel', -> scope: evaluated: '=value' bound: '=twoway' link: -> scope.evaluated # = false scope.bound = 'foo' # Updates parent.someProperty...
...HTML attributes bound with = (value, twoway) have their value evaluated as Angular expression in the parent scope's context and have the result assigned to the corresponding scope variable (evaluated...
If you're using the :header_html option in PDFKit (or the corresponding --header-html option in wkhtmltopdf), and the header remains invisible, you need to add this to your...
The same applies to footers via footer_html
In order to keep the controllers directory tidy, we recently started to namespace controllers. With the :controller option you can...
...Checks if the page or current node has the given text content, ignoring any HTML tags and normalizing whitespace.` (Boolean) has_css?(path, options = {}) Checks if a given CSS selector...
...the page or current node does not have the given text content, ignoring any HTML tags and normalizing whitespace. (Boolean) has_no_css?(path, options = {}) Checks if a given CSS...
Consider this HTML: Even though the surrounding container defines a line-height, which vertically centers its inline elements, the check box will be top aligned if it is the only...
...element inside the container. It will be aligned correctly if the HTML looks like this: foo Complex explanation here. So the actual fix is to add some inline elements next...
...public contract path in the mailer view: Plain text email URI.join(root_url, @user.contract.url) HTML email link_to('Show contract', URI.join(root_url, @user.contract.url).to_s) Note: You need to...
...else -- your IDE may even be aware of it, for example RubyMine understands <<-SQL, <<-HTML, <<-XML, <<-JSON, etc and highlights correctly. Please note: Your string will end with a new...
...you can just put your heredocs strings below each other. Example: def long_messages html_escape(<<-ONE) + ' ' + html_escape(<<-TWO) Here goes my first very long message. Yeehaw! ONE
SiteDomain="yourdomain.de" DirData="." DNSLookup=0 Run the following to build a simple HTML page: awstats -staticlinks -config="yourdomain.de" -LogFile=your-logfile.log -output > report.html This might take a second (it...
Under certain (unknown) circumstances, Rails will give localized files an invalid content-type in the Response header. For me, after...
...finished re-compiling, you will just reload the same old assets. When you render HTML without a dev server When you don't have a dev server running and call...
...most Rails application layouts insert randomly rotating CSRF tokens and CSP nonces into the HTML, two requests for the same content and user will never produce the same response bytes...
The step definition below allows you to write: Then I should see an HTML redirect to "http://www.makandracards.com" in the page head Capybara Then /^I should see an HTML redirect...
In Rails, you can very easily send emails with HTML and plaintext bodies. However, if you're trying to debug those using your normal email account, you might be out...
...will simply throw away the plaintext part of your mail, and just save the html part...
.../tmp/github.html Paste your markdown Press Ctrl-D to finalize your input Open the generated HTML file and print it.
db/schema.rb db/structure.sql public/system .project .idea/ public/javascripts/all* public/stylesheets/all* public/stylesheets/*.css config/database.yml *~ *#* .#* .DS_Store webrat-*.html capybara-*.html rerun.txt coverage.data coverage/* dump_for_download.dump .~lock.* .*.swp C:\\nppdf32Log\\debuglog.txt
It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let...
...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...
...visible or hidden, we always expect the given text to be contained in the HTML. The test is about whether or not it is hidden via CSS.
Sometimes you want to run a command forever, e.g. to compile a haml to html file on the console. Use this: $ while(true) do haml index.haml index.html; sleep 1.5; done
...our applications. There are many ways to achieve this, from SVGs inlined into the HTML, SVGs inlined in CSS, JavaScript-based solutions, to icon fonts. Out of all these options...
...produces the desired result. vertical-align: text-bottom margin-bottom: -.1em Now, in your HTML, you can add an icon with Icon names are simply the file names of the...
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...
...chain function calls to the promise using .then(), without needing to wait for the HTML request to actually return. The promise will collect all functions passed to then() and invoke...
+buttons-sprite("blue-button", false, x-offset, y-offset) Spacing When your HTML element is larger than the image you're using, other images in the same sprite...