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

Problem pre- and post-fix round form styles #6615

Closed
davidrhoderick opened this issue Jun 8, 2015 · 5 comments
Closed

Problem pre- and post-fix round form styles #6615

davidrhoderick opened this issue Jun 8, 2015 · 5 comments
Assignees

Comments

@davidrhoderick
Copy link

Rafi Benkual took part in this thread regarding a problem with pre-fix (and post-fix) round forms not working. Basically, if you copy and paste the example code for post-fix round (which was my personal experience) into a project with Foundation, you won't get the double rounded appearance as in the docs. I don't know where the error is exactly and their is quite a lot of talk in the thread about fixing this issue for the top bar even though it is also present if used in the body of a page. I was able to fix it by adding this:

input[type=text].postfix.round,
input[type=email].postfix.round {
  border-radius: 1000px 0 0 1000px;
}

in my custom .scss files but I don't think that developers should have to amend the library to get standard functionality. Let me know if I can clarify some more.

@brendanvinson
Copy link

Am experiencing this same issue for postfix-radius as well for forms outside of the navigation:

  1. With the code directly from the docs, the input and button are unaffected.
  2. Adding radius to the button rounds the outside corners as expected.
  3. Adding radius to the input element rounds all corners.

The code below fixes it:

.postfix-radius {
     input {
        border-top-left-radius: $global-radius;
        border-bottom-left-radius: $global-radius;
    }
    .postfix {
        border-radius: 0;
        border-top-right-radius: $global-radius;
        border-bottom-right-radius: $global-radius;
    }
}

@rafibomb rafibomb self-assigned this Oct 9, 2015
@rafibomb rafibomb added the forms label Oct 9, 2015
@rafibomb rafibomb added this to the 5.5.4 milestone Oct 9, 2015
@quinncomendant
Copy link
Contributor

I just noticed this, and I think the problem is due to a requirement for the input field to be nested within two levels of .row. The code from the example page, simplified below, is acted upon by the selector form .row .postfix-round.row.collapse input { … }.

<div class="row">
  <div class="large-6 columns">
    <div class="row collapse postfix-round">
      <div class="small-9 columns">
        <input type="text" placeholder="Value">
      </div>
      <div class="small-3 columns">
        <a href="#" class="button postfix">Go</a>
      </div>
    </div>
  </div>
</div>

It is assumed it would work with the selector .postfix-round.row.collapse input { … }, in which case the code could be as simple as:

<div class="row collapse postfix-round">
  <div class="small-9 columns">
    <input type="text" placeholder="Value">
  </div>
  <div class="small-3 columns">
    <a href="#" class="button postfix">Go</a>
  </div>
</div>

@ventismith's suggestion works, although it might be good to keep the .collapse selector, since it's required to avoid a gap between the columns.

@quinncomendant
Copy link
Contributor

I got this working by moving lines 438-465 from _forms.scss out from within the form { .row { … } }.

@SalahAdDin
Copy link

What's about this feature in Foundation ???

@rafibomb rafibomb removed this from the 5.5.4 milestone Nov 28, 2016
@rafibomb
Copy link
Member

rafibomb commented Oct 3, 2017

This is resolved in F6. A PR would be merged for this. We'll close this here - thanks!

@rafibomb rafibomb closed this as completed Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants