dhg / Skeleton

Skeleton: A Dead Simple, Responsive Boilerplate for Mobile-Friendly Development
http://www.getskeleton.com
MIT License
19.08k stars 3.15k forks source link

size attribute to input box isn't responsive #378

Open ghost opened 5 years ago

ghost commented 5 years ago

Hey!

If you add a size attribute to an input element, it isn't responsive and I don't exactly know how you could make it responsive. I'm not sure if it'd be possible to add a class that would make it responsive, but yeah.

toxicmender commented 5 years ago

You should check here for examples screenshot_2018-12-12 skeleton responsive css boilerplate

This makes a responsive <div> which contains your input element. Although I'm not sure if creating a CSS class for the input would work but this way you can contain the input in a responsive <div>, creating the same effect.

<!-- The above form looks like this -->
<form>
  <div class="row">
    <div class="six columns">
      <label for="exampleEmailInput">Your email</label>
      <input class="u-full-width" type="email" placeholder="test@mailbox.com" id="exampleEmailInput">
    </div>
    <div class="six columns">
      <label for="exampleRecipientInput">Reason for contacting</label>
      <select class="u-full-width" id="exampleRecipientInput">
        <option value="Option 1">Questions</option>
        <option value="Option 2">Admiration</option>
        <option value="Option 3">Can I get your number?</option>
      </select>
    </div>
  </div>
  <label for="exampleMessage">Message</label>
  <textarea class="u-full-width" placeholder="Hi Dave …" id="exampleMessage"></textarea>
  <label class="example-send-yourself-copy">
    <input type="checkbox">
    <span class="label-body">Send a copy to yourself</span>
  </label>
  <input class="button-primary" type="submit" value="Submit">
</form>

<!-- Always wrap checkbox and radio inputs in a label and use a <span class="label-body"> inside of it -->

<!-- Note: The class .u-full-width is just a utility class shorthand for width: 100% -->