Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Задание атрибута вида <input required> #145

Merged
merged 1 commit into from
May 12, 2015
Merged

Задание атрибута вида <input required> #145

merged 1 commit into from
May 12, 2015

Conversation

sameoldmadness
Copy link
Contributor

Хотелось бы иметь возможность задавать атрибут без значения:

<input required disabled hidden>

Сейчас приходится использовать вариант required="required".

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.26%) to 99.74% when pulling bbcd3bb on sameoldmadness:feature/set-boolean-attrs into 8f49e4a on bem:master.

@qfox
Copy link
Member

qfox commented May 1, 2015

На первый взгляд — логично, вспоминая булевые модификаторы.

Но если true — пусто, то false — ?

И тест бы. ;-)

@blond
Copy link
Member

blond commented May 1, 2015

Но если true — пусто, то false — ?

Если false, undefined или null то атрибут совсем не выставляется.

@sameoldmadness
Copy link
Contributor Author

Смогу прилично оформить пулл-реквест после 9 мая.

Добавлю проверку на === false, тест и пример в ридми.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c829f01 on sameoldmadness:feature/set-boolean-attrs into 8f49e4a on bem:master.

@sameoldmadness
Copy link
Contributor Author

Добавил тесты и примеры.

Обратите внимание, что ломается обратная совместимость.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling cfbd32e on sameoldmadness:feature/set-boolean-attrs into 8f49e4a on bem:master.

mishanga added a commit that referenced this pull request May 12, 2015
Задание атрибута вида <input required>
@mishanga mishanga merged commit e431c20 into bem:master May 12, 2015
@mishanga
Copy link
Member

Спасибо!

@sameoldmadness sameoldmadness deleted the feature/set-boolean-attrs branch May 12, 2015 08:34
@un1ko85
Copy link

un1ko85 commented May 31, 2015

Спасибо, столкнулся когда надо было сделать разметку scheme.org, сейчас все будет ок!!

@arikon
Copy link
Member

arikon commented Aug 7, 2015

@mishanga This change was backward incompatible. Should be released as a major version bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants