background preloader

CSS and related

Facebook Twitter

Javascript - How to inherit css styles in child component from parent in Angular 5. Preview - Bootstrap Themes. 10 SCSS utilities I can’t live without | Hacking UI Magazine. Every front-end developer needs a battle-tested SCSS arsenal for starting new projects. Here are 10 of the best SCSS utilties I find myself using most often. You can download the entire file to use in your projects from the UtilityBelt Repository on Github. Download “UtilityBelt.scss”UtilityBelt.zip – Downloaded 109 times – 10 kB Triangle Sagi likes to call this the chupchick (don’t ask me why). It’s great for adding a point to tooltips or some extra flair to a component, but can also be used as a standalone icon. A descriptive div that uses the triangle mixin to point to something.

Currency I wanted to be able to display a currency symbol on any type of text element without breaking the design, but also to be able to switch it easily. Example Usage <body class="USD"><span class="price">45</span></body> .price { @extend %currency; } Clear Fix There are many different ways to clear floats, but Nicholas Gallagher’s micro clearfix hack seems to have become the most popular. Example usage. Using data attributes - Learn web development. HTML5 is designed with extensibility in mind for data that should be associated with a particular element but need not have any defined meaning. data-* attributes allow us to store extra information on standard, semantic HTML elements without other hacks such as non-standard attributes, extra properties on DOM, or Node.setUserData().

HTML syntaxEdit The syntax is simple. Any attribute on any element whose attribute name starts with data- is a data attribute. Say you have an article and you want to store some extra information that doesn’t have any visual representation. Just use data attributes for that: <article id="electriccars" data-columns="3" data-index-number="12314" data-parent="cars"> ... JavaScript accessEdit Reading the values of these attributes out in JavaScript is also very simple. To get a data attribute through the dataset object, get the property by the part of the attribute name after data- (note that dashes are converted to camelCase). CSS accessEdit IssuesEdit See alsoEdit. Angular Material - Demos > Colors. Simple Alignments with CSS Flexbox. Font size and zoom - increase the size of web pages. The zoom controls allow you to increase or decrease either the size of a whole web page or just the size of all the text in order to improve readability.

We'll explain how it works. Here's how you can zoom in and out of individual websites. Click the menu button on the right. The customization menu will open and you will see the zoom controls at the top. Use the + button to zoom in, and the - button to zoom out. Keyboard shortcuts: You can also use the zoom controls without a mouse. Tip: To set the default zoom level for all websites, try the NoSquint Plus add-on. Instead of changing the size of everything, you can just change the size of the text. Press the Alt key to temporarily bring up the traditional Firefox menus. Set a minimum text size You can set Firefox to automatically display all text at a minimum font size. Click the menu button and choose Options.Preferences. Click OK to save your changes. CSS Conditional Rules Module Level 3. Abstract CSS is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, in speech, etc.

This module contains the features of CSS for conditional processing of parts of style sheets, conditioned on capabilities of the processor or the document the style sheet is being applied to. It includes and extends the functionality of CSS level 2 [CSS21], which builds on CSS level 1 [CSS1]. The main extensions compared to level 2 are allowing nesting of certain at-rules inside ‘@media’, and the addition of the ‘@supports’ rule for conditional processing. Status of this document This section describes the status of this document at the time of its publication. Other documents may supersede this document. This document was produced by the CSS Working Group as a Candidate Recommendation.

A Candidate Recommendation is a document that has been widely reviewed and is ready for implementation. The following features are at risk: Table of contents 1. 1.1. 2. Stylesheet Download Tests. A test by @scottjehl The point of this page is to test whether today's browsers will download stylesheets that are referenced with media queries that would not apply on that browser or device. This page contains 10 link elements that reference CSS files meant for testing. Each link has a media attribute containing a unique media query. All but a few of these media queries (and their respective stylesheets) would not likely apply on any devices today; for example, some media queries reference extremely wide screens, some reference impossibly (currently) rich high-density HD displays, and one is just plain nonsense (really: media="nonsense").

The results of manually testing this page by loading it in several browsers and monitoring HTTP traffic are as follows. CSS Hacks Targeting Firefox. Centering in the Unknown. By Chris Coyier On centering, pseudo elements, vertical-align When it comes to centering things in web design, the more information you have about the element being centered and its parent element, the easier it is. So what if you don't know anything? It's still kinda doable. #Not too hard: Known Child If you know the height and width of both the element to be centered and its parent element (and those measurements won't change, i.e. not fluid width environment) one foolproof way to center the element is just to absolute position it with pixel values so it looks perfectly centered.

Let's say you know the exact width and height of the element you are centering, but the parent element can change in height and width. You absolutely position the element to be centered and set the top and left values to 50% and the margin top and left values to negative half of the elements height and width. #Harder: Unknown Child The hard comes in when you don't know the dimensions of the element to be centered.

Genericons: Eine kostenlose Icon Font für WordPress-Projekte – Elmastudio. Es gibt inzwischen jede Menge Icon Fonts und in einem früheren Artikel habe ich bereits über die sehr beliebte Font Awesome Icon Font (eine Icon Font, die sich vor allem für Bootstrap-Projekte geeignet) berichtet. Für unser nächstes WordPress-Theme haben wir uns für die Genericons Icon Font entschieden. Die Font besitzt zwar keine so riesige Icon-Auswahl, aber für die meisten WordPress-Projekte sind die Icons meiner Ansicht nach vollkommen ausreichend. Außerdem ist Genericons Font von Automattic (der Firma des WordPress-Gründers Matt Mullenweg) speziell für den Einsatz in WordPress-Themes entwickelt worden und hat eine Open Source GPL-Lizenz.

Die Genericons Icon Font in ein Theme integrieren Die Integration der Icon Font in dein WordPress-Theme ist ganz einfach. Du kannst dir den Font-Ordner mit Anleitung einfach auf der Genericons-Webseite herunterladen. Außerdem musst du die Font selbst natürlich noch in deinem Theme-Ordner zur Verfügung stellen. Die Icons im Theme nutzen. Bootswatch · BootstrapCDN by MaxCDN. BootstrapCDN The recommended CDN for Bootstrap, Font Awesome and Bootswatch. Bootswatch 4 Try it! Click to copy Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Try it! Kaliber5/ember-sticky-element: An ember component that mimics the functionality of `position: sticky` What is the `data-target` attribute in Bootstrap 3? Html - How to adjust the alignment of placeholder text in input box? Getting Started. HTML Templates | Foundation.

News or Magazine This template puts a focus on bold images, perfect for a magazine style site with eye catching content. Your stories are easy to find with large feature blocks. See Demo Real Estate or Travel Big thumbnails with a space for captions and descriptions along with an informative header make this the perfect template for real estate or hotel booking. See Demo Ecommerce Homepage Building an online store? See Demo Agency Bring your work to the forefront with this sleek template that's perfect for agencies or freelancers. See Demo Blog w/ Sidebar Large images, an easy to navigate layout, and versatile sidebar will help you get your blog up and running. See Demo Blog Single Column This sleek, minimal approach can help your blog stand out by putting content front and center.

See Demo Portfolio Show off your work and highlight what you do with this grid style thumbnail layout. See Demo Product Page Highlight your new product and educate potential customers with this classic template. See Demo. Angular Docs. File: SASS_REFERENCE — Documentation by YARD 0.9.12. Sass is an extension of CSS that adds power and elegance to the basic language. It allows you to use variables, nested rules, mixins, inline imports, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized, and get small stylesheets up and running quickly, particularly with the help of the Compass style library. Features Fully CSS-compatible Language extensions such as variables, nesting, and mixins Many useful functions for manipulating colors and other values Advanced features like control directives for libraries Well-formatted, customizable output Syntax There are two syntaxes available for Sass.

The second and older syntax, known as the indented syntax (or sometimes just "Sass"), provides a more concise way of writing CSS. Either syntax can import files written in the other. . # Convert Sass to SCSS $ sass-convert style.sass style.scss # Convert SCSS to Sass $ sass-convert style.scss style.sass Using Sass gem install sass Rack/Rails/Merb Plugin or. Why You Should Avoid Sass @extend.

About a year ago, I wrote Mixin or Placeholder (my first article here at SitePoint) immediately followed by What Nobody Told You About Sass Extend. And here I am, one year later, changing my mind again and writing why I think the @extend directive from Sass is really far from being the Eldorado. TL;DR: Extending is invisible. Extending doesn’t necessarily help file weight, contrary to the saying. Extending doesn’t work across media queries. Extending is not flexible. Mixins have absolutely no drawback.

But first, I should probably give you a little reminder. This Sass snippet will yield this CSS: That is pretty much all you need to know about @extend to fully appreciate this article so now that we’ve covered the basics, it’s time to move on. However worry not, this is not yet another article about how "Sass @extend can output outrageously long selectors if you’re messing with it". Extending is invisible Sass is just a tool. Because of this, Sass as any other tool, should be transparent. CSS Box Shadow. Used in casting shadows off block-level elements (like divs). The horizontal offset of the shadow, positive means the shadow will be on the right of the box, a negative offset will put the shadow on the left of the box.The vertical offset of the shadow, a negative one means the box-shadow will be above the box, a positive one means the shadow will be below the box.The blur radius (optional), if set to 0 the shadow will be sharp, the higher the number, the more blurred it will be.The spread radius (optional), positive values increase the size of the shadow, negative values decrease the size.

Default is 0 (the shadow is same size as blur).Color #Example #Inner Shadow #Example #Internet Explorer Box Shadow You need extra elements... <div class="shadow1"><div class="content"> Box-shadowed element </div></div> #One-Side Only Using a negative spread radius, you can get squeeze in a box shadow and only push it off one edge of a box. Coolors.co - The super fast color schemes generator. Html - CSS: Make two floating elements overlap. Box Shadow CSS Generator | CSSmatic. Html - CSS remove default blue border. How to change an input button image using CSS? How To Create Image Hover Overlay Effects. Vertical-align. The vertical-align property in CSS controls how elements set next to each other on a line are lined up.

In order for this to work, the elements need to be set along a baseline. As in, inline (e.g. <span>, <img>) or inline-block (e.g. as set by the display property) elements. The valid values are: baseline - This is the default value.top - Align the top of the element and its descendants with the top of the entire line.bottom - Align the bottom of the element and its descendants with the bottom of the entire line.middle - Aligns the middle of the element with the middle of lowercase letters in the parent.text-top - Aligns the top of the element with the top of the parent element's fonttext-bottom - Aligns the bottom of the element with the bottom of the parent element's font.sub - Aligns the baseline of the element with the subscript-baseline of its parent.

Like where a <sub> would sit.super - Aligns the baseline of the element with the superscript-baseline of its parent. #More Information. Dynamic classname inside ngClass in angular 2. CSS3 Gradients. HTML Colors from Image. 3 Ways To Remove EXIF MetaData From Photos (And Why You Might Want To) Did you know that most cameras embed hidden information, called metadata, into every photograph taken?

And when you share those images, say by uploading them to a social network, that hidden information often stays embedded? And that people can view said information for almost no effort at all? This metadata is called EXIF data (Exchangeable Image File Format) and is harmless in most cases, but can be used by malicious users to inconvenience you at best or harm you at worst. EXIF data embeds a lot of this technical information into the image itself, making it easy for you to see how a particular photograph was taken (great for studying, learning, and recreating).

For example, EXIF data can include: Camera manufacturer and model.Data and time.Compression type.Aperture, shutter speed, and ISO settings.Metering mode.Flash mode.Pixel resolution. Sounds fine, right? Consider a GPS-enabled, camera-equipped smartphone. Consider a DSLR camera that you’ve been using for years. 1. 2. 3. Htmlcolorcodes. Analogous Complementary Triadic Tetradic Analogous Neutral Shades Tints Tones Color Picker Use the color picker by clicking and dragging your cursor inside the picker area to highlight a color on the right. Input Hex, RGB, HSL or CMYK values to search for a particular color in the fields below the color swatch; click the swatch to add it to your palette. After selecting a color, experiment with different harmonies by using the dropdown below the color picker. Color Harmonies Color harmonies are particularly pleasing combinations of two or more colors derived from their relationship on a color wheel.

Complementary colors Colors that are directly opposite one another on the color wheel are known as complementary colors. Triadic colors Triadic harmonies consist of three colors equidistant from one another on the color wheel. Tetradic colors Tetradic color harmonies are formed by two sets of complementary colors 60 degrees apart on the color wheel. Analogous colors Neutral colors. How to Center in CSS. Understanding vertical-align, or "How (Not) To Vertically Center Content" Fallback. Using CSS Fallback Properties for Better Cross-browser Compatibility - Modern Web. CSS/Eigenschaften/Anzeige/overflow. Viewport Sized Typography. Css - Font scaling based on width of container.

How to build and publish an Angular module – Cyrille Tuzi. Coolors.co - The super fast color schemes generator. 100 Great CSS Menu Tutorials. CSS Backgrounds. DirtyMarkup Formatter - CSS Beautifier for Stylesheets. Sass vs. LESS. Sass vs. Less: So findest du den richtigen Präprozessor für dich | ❤ t3n. UiGradients - Beautiful colored gradients.