diff --git a/readme.md b/readme.md index b635aa290b..3af1e095bb 100644 --- a/readme.md +++ b/readme.md @@ -18,19 +18,19 @@ ___ - a search bar has 3 state default, `hover` and `focus` - don't use JavaScript - use `@font-face` for fonts -- add attribute `data-qa="big"` for big search form, and `data-qa="small"` for small +- add attribute `data-qa="big"` for big search form, and `data-qa="big"` for small - add attribute `data-qa="keypress"` to input in big search form --- ## Checklist ❗️ Replace `` with your Github username and copy the links to `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_search-bar-airbnb/) -- [TEST REPORT LINK](https://.github.io/layout_search-bar-airbnb/report/html_report/) +- [DEMO LINK](https://CNegruzzi.github.io/layout_search-bar-airbnb/) +- [TEST REPORT LINK](https://CNegruzzi.github.io/layout_search-bar-airbnb/report/html_report/) ❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it. -- [ ] Icon implemented using background-image CSS property -- [ ] Inputs are written inside of 'form' tag with correctly passed attributes -- [ ] All `Typical Mistakes` from `BEM` lesson theory are checked. -- [ ] Code follows all the [Code Style Rules ❗️](./checklist.md) +- [X] Icon implemented using background-image CSS property +- [X] Inputs are written inside of 'form' tag with correctly passed attributes +- [X] All `Typical Mistakes` from `BEM` lesson theory are checked. +- [x] Code follows all the [Code Style Rules ❗️](./checklist.md) diff --git a/src/index.html b/src/index.html index abe507e10c..6a7ce8261f 100644 --- a/src/index.html +++ b/src/index.html @@ -1,5 +1,9 @@ - + + - Document + Search - - + - + + + + diff --git a/src/style.css b/src/style.css index a63fa10d43..d890656586 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,99 @@ -/* add styles here */ +/* #region page */ +@font-face { + font-family: Avenir; + font-weight: 300; + font-style: normal; + src: url('fonts/Avenir-Book.ttf') format('truetype'); +} + +@font-face { + font-family: Avenir; + font-weight: 600; + font-style: normal; + src: url('fonts/Avenir-Heavy.ttf') format('truetype'); +} + +.page { + font-family: Avenir, sans-serif; +} + +/* #endregion */ + +/* #region search */ + +.search { + margin-top: 20px; +} + +.search__input { + width: 100%; + box-sizing: border-box; + box-shadow: 0 3px 8px 0 rgba(61, 78, 97, 0.1); + border: 1px solid rgba(225, 231, 237, 1); + border-radius: 4px; + font-family: inherit; + color: rgba(61, 78, 97, 1); +} + +.search__input:focus { + outline: none; + font-weight: 800; + border-radius: 3px; + box-shadow: 0 4px 4px 0 #00000040; +} + +.search__input:hover { + box-shadow: 0 3px 8px 0 rgba(61, 78, 97, 0.2); +} + +.search__input::placeholder { + font-family: inherit; + color: rgba(61, 78, 97, 1); + font-weight: 300; +} + +/* #endregion */ + +/* #region big */ + +.search__input--big { + height: 70px; + padding-left: 62px; + font-size: 16px; + background-image: url(images/Search.svg); + background-repeat: no-repeat; + background-position: 26px 50%; + background-size: 19px; +} + +.search__input--big:focus { + background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); + background-image: url(images/Search.svg); + background-repeat: no-repeat; + background-position: 26px 50%; + background-size: 19px; +} + +/* #endregion */ + +/* #region small */ + +.search__input--small { + height: 42px; + padding-left: 33px; + font-size: 14px; + background-image: url(images/Search.svg); + background-size: 11px; + background-position: 13px 50%; + background-repeat: no-repeat; +} + +.search__input--small:focus { + background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); + background-image: url(images/Search.svg); + background-size: 11px; + background-position: 13px 50%; + background-repeat: no-repeat; +} + +/* #endregion */