0

I am using Kendo UI with ASP MVC3 to build some forms. I am using the dropdown and datepicker widgets, which are styled larger that standard inputs. To ensure standard textboxes will match, Kendo has provided the .k-textbox class, which when assigned to a textbox, will style it to match the widgets.

I have created a template that does the job but is requiring a little extra coding to handle some conflicts, no biggie. However, I was wondering if there was a way to make an attribute selector (eg: input[type="text"]) inherit the style from another styled class. So could I make input[type=:text"] use the same styles as .k-textbox, without copying all the class data over?

1
  • Ok I am just going to use a template. Thanks. Commented Jun 12, 2013 at 18:48

1 Answer 1

0

You could add your selector to the existing one, separated by a comma:

.k-textbox, input[type="text"] {
   /* classes already written by Kendo */
}

but then you won't be able to easily update this CSS when Kendo updates it.

Sign up to request clarification or add additional context in comments.

2 Comments

Unfortunately kendo has the styles for k-textbox spread over 17 or so different places.
30 occurences in my copy of commons.min.css, yep :/ Still possible with regexp at least in Sublime Text but a bit complicated (you've to capture what is between k-textbox and the next comma and add it to your selector too...)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.