kobezzza,
и вот ещё такой вопрос: css модуль применяется к конкретному элементу, а как правильно применять стили сразу ко всем элементам? Например, для сброса стилей по умолчанию: * { // } html, body { // } |
Цитата:
Цитата:
<style> button { font-size: 0.8rem; padding: 0.4rem 1rem 0.45rem; background: none; border: 1px solid; border-radius: 0.25rem; min-width: 9em; margin: 0.25rem; } [state=disabled]{ color: hsl(210, 61%, 31%); background-color: hsla(210, 61%, 51%, 0.1); } [state=error]{ color: hsla(0, 61%, 51%, 0.5); background: white; } [state=progress]{ color: hsl(210, 61%, 31%); background: linear-gradient(to top right, hsl(0, 100%, 100%), hsl(0, 100%, 100%) 25%, hsl(221, 100%, 97%) 25%, hsl(221, 100%, 97%) 50%, hsl(0, 100%, 100%) 50%, hsl(0, 100%, 100%) 75%, hsl(221, 100%, 97%) 75%, hsl(221, 100%, 97%)) 0 0 / 8rem 8rem; } </style> <button>Normal</button> <button state="disabled">Disabled</button> <button state="error">Error</button> <button state="progress">Progress</button> Цитата:
Цитата:
|
Poznakomlus, красавчик
но если ты хочешь дать насколько состояний одновременно _red _warning _no-admin |
Цитата:
E[foo="bar"] an E element whose "foo" attribute value is exactly equal to "bar" Attribute selectors 2 E[foo~="bar"] an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar" Attribute selectors 2 E[foo^="bar"] an E element whose "foo" attribute value begins exactly with the string "bar" Attribute selectors 3 E[foo$="bar"] an E element whose "foo" attribute value ends exactly with the string "bar" Attribute selectors 3 E[foo*="bar"] an E element whose "foo" attribute value contains the substring "bar" Attribute selectors 3 E[foo|="en"] an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en" Attribute selectors 2 http://www.w3.org/TR/selectors/ <style> [style*=blue]{ color: blue } [style*=bold]{ font-weight: bold } </style> <label style="blue, bold">Test</label> |
Цитата:
|
Но разве селекторы по атрибутам не самые медленные?:-?
|
рони,
это как бы намек на зарезервированное, я правильно понял? |
Poznakomlus,
да и в ie не сработает |
style и [style] разные селекторы в ие проверял edge работает
все остальное не смотрел от меня спс, давно не мог поставить я бы все равно написал бы примерно так _style, а может и style:write: |
Poznakomlus,
:thanks: всё что ниже edge :) |
Часовой пояс GMT +3, время: 15:06. |