Open RudolfVonKrugstein opened 8 years ago
In docs, I'm using plain HTML input:
<TopBarItem position="right">
<Menu>
<MenuItem><input type="search" placeholder="Search" /></MenuItem>
<MenuItem><Button>Search</Button></MenuItem>
</Menu>
</TopBarItem>
But to get the Foundation input styling I needed to be using this library's FormField component:
<TopBarItem position="right">
<Menu>
<MenuItem>
<FormField>
<FormFieldInput />
</FormField>
</MenuItem>
<MenuItem><Button>Search</Button></MenuItem>
</Menu>
</TopBarItem>
I implemented FormField after TopBar and forgot to go back and try to see if it worked with TopBar properly.
Ok, cool. Thanks! now it looks like this:
So the search input is not aligned with the button. I will investigate later when I have more time, but maybe you have another Idea?
Hey, Could it be that somehow the order of css statements is incorrect?
When inspecting in chrome, I see that for the react-foundation-components the rules are in different order than from the example site.
OK, I know why. In lib/forms/_styles.scss the import is like this:
.form-field {
@include foundation-form-text;
@include foundation-form-checkbox;
@include foundation-form-label;
@include foundation-form-helptext;
@include foundation-form-prepostfix;
@include foundation-form-select;
@include foundation-form-error;
@import './custom';
}
The extra .form-field
makes the rules more specific than this rule:
.top-bar input {
max-width: 200px;
margin-right: 1rem;
}
So the order is different than on the foundation example site.
Removing the .form-field
solves the problem here, but I do not know what other implications that hase.
I am trying out the tob-bar example/documentation.
When I do this, I get a topbar that looks like this:
http://i.stack.imgur.com/XSiWW.png
On the foundation example site: http://foundation.zurb.com/sites/docs/top-bar.html there is a notable difference: The size of the search input.
So some css is missing, and I think it is this, taken from the example sites css:
Why is this not included, what do I have to do?