-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
element picker, android + desktop v2
Signed-off-by: Vadym Struts <[email protected]>
- Loading branch information
1 parent
a3fec02
commit 50b3c88
Showing
14 changed files
with
352 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
153 changes: 153 additions & 0 deletions
153
components/cosmetic_filters/resources/data/android_element_picker.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
<style> | ||
:host { | ||
background: transparent; | ||
color: black; | ||
font: 14px sans-serif; | ||
height: 100%; | ||
width: 100%; | ||
margin: 0; | ||
overflow: hidden; | ||
font-family: "Noto Sans", Arial, sans-serif; | ||
} | ||
|
||
:host :focus { | ||
outline: none; | ||
} | ||
|
||
#rules-box { | ||
height: 8em; | ||
margin-bottom: 5px; | ||
background-color: #fff; | ||
border-radius: .1em; | ||
display: none; | ||
} | ||
|
||
#rules-box>textarea { | ||
box-sizing: border-box; | ||
height: 100%; | ||
width: 100%; | ||
resize: none; | ||
border: none; | ||
padding: 5px; | ||
overflow: auto; | ||
overflow-wrap: break-word; | ||
} | ||
|
||
section { | ||
background-color: #FFFFFF; | ||
color-scheme: light only; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
width: 100%; | ||
box-sizing: border-box; | ||
min-width: 24em; | ||
padding-top: 4px; | ||
padding-right: 4px; | ||
padding-left: 4px; | ||
position: fixed; | ||
opacity: 1; | ||
height: auto; | ||
} | ||
|
||
section input { | ||
width: calc(100% - 4px); | ||
} | ||
|
||
#buttons { | ||
display: flex; | ||
justify-content: space-between; | ||
flex-direction: column; | ||
} | ||
|
||
.buttons-line { | ||
display: flex; | ||
justify-content: space-between; | ||
flex-direction: row; | ||
padding-bottom: 6px; | ||
} | ||
|
||
.block-button { | ||
background-color: #4036d3; | ||
color: #FFFFFF; | ||
cursor: pointer; | ||
padding: 4px 6px; | ||
margin: 0 2px 0 2px; | ||
border-radius: .4em; | ||
flex-grow: 1; | ||
border-width: 0px; | ||
} | ||
.block-button-disabled { | ||
background-color: #d6d6d6; | ||
color: #959595; | ||
} | ||
|
||
.secondary-button { | ||
background-color: #FFFFFF; | ||
color: #4036d3; | ||
cursor: pointer; | ||
padding: 4px 6px; | ||
margin: 0 2px 0 2px; | ||
border-radius: .4em; | ||
flex-grow: 1; | ||
border-width: 0px; | ||
|
||
} | ||
|
||
.secondary-button-bordered { | ||
border-width: 1px; | ||
border-color: #4036d3; | ||
} | ||
|
||
svg { | ||
cursor: crosshair; | ||
box-sizing: border-box; | ||
height: 100%; | ||
width: 100%; | ||
top: 0; | ||
left: 0; | ||
position: absolute; | ||
} | ||
|
||
#darken { | ||
fill: rgba(0, 0, 0, 0.5); | ||
} | ||
|
||
#slider-container { | ||
padding-bottom: 4px; | ||
} | ||
.target { | ||
stroke: #3d39c8; | ||
stroke-width: 2px; | ||
fill: rgba(121, 116, 224, 0.25); | ||
} | ||
</style> | ||
<svg xmlns="http://www.w3.org/2000/svg" id="picker-ui"> | ||
<defs> | ||
<mask id="highlight-mask"> | ||
<rect x="0" y="0" width="100%" height="100%" fill="white"> | ||
</mask> | ||
</defs> | ||
<rect id="darken" x="0" y="0" width="100%" height="100vh" mask="url(#highlight-mask)"> | ||
</svg> | ||
<section id="main-section"> | ||
<div id="rules-box"> | ||
<textarea></textarea> | ||
</div> | ||
<div> | ||
<div id="slider-container"> | ||
<input id="sliderSpecificity" type="range" min="0" max="4" value="4"> | ||
</div> | ||
<div id="buttons"> | ||
<div class="buttons-line"> | ||
<button id="btnCreate" class="block-button block-button-disabled">Select element you want to block</button> | ||
</div> | ||
<div class="buttons-line"> | ||
<button id="btnManage" class="secondary-button">Manage filters</button> | ||
<button id="btnShowRulesBox" class="secondary-button">Show rules</button> | ||
<button id="btnQuit" class="secondary-button secondary-button-bordered">Cancel</button> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
Oops, something went wrong.