media

slinky.web.html.media$
object media extends Attr

source - Media query of the resource's intended media; this should be used only in a <picture> element. style - This attributeĀ defines which media the style should apply to. Its value is a media query, which defaults to all if the attribute is missing. link - This attribute specifies the media which the linked resource applies to. Its value must be a media query. This attribute is mainly useful when linking to external stylesheets by allowing the user agent to pick the best adapted one for the device it runs on.

Usage note:

  • In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., media types and groups, where defined and allowed as values for this attribute, such as print, screen, aural, braille. HTML5 extended this to any kind of media queries, which are a superset of the allowed values of HTML 4.
  • Browsers not supporting the CSS3 Media Queries won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4. area - A hint of the media for which the linked resource was designed, for example print and screen. If omitted, it defaults to all. Use this attribute only if the href attribute is present.

Attributes

Graph
Supertypes
trait Attr
class Object
trait Matchable
class Any
Self type
media.type

Members list

Concise view

Type members

Classlikes

object tag extends TagElement

Attributes

Graph
Supertypes
class TagElement
class Object
trait Matchable
class Any
Self type
tag.type

Types

type attrType = _media_attr.type

Inherited types

type supports[T <: Tag] = AttrPair[attrType] => AttrPair[tagType]

Attributes

Inherited from:
Attr

Value members

Concrete methods

def :=(v: String): AttrPair[_media_attr.type]
def :=(v: Option[String]): OptionalAttrPair[_media_attr.type]